Changeset 6704 for 2015


Ignore:
Timestamp:
2015-07-01 18:34:38 (8 years ago)
Author:
sieerinn
Message:

Viime commitissa saattoi olla ei-kääntyvää koodia. Nyt ei pitäisi olla virheitä enää.

Location:
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs

    r6703 r6704  
    2424    void CreateLevel(string levelName) 
    2525    { 
     26        bossSpawnPositions.Clear(); 
    2627        Level.CreateVerticalBorders(1.0, false, Color.Yellow); 
    2728        PhysicsObject leftBorder = Level.CreateLeftBorder(0.0, false); 
     
    4041        level.SetObjectMethod("coyote", CreateCoyote); 
    4142        level.SetObjectMethod("boss", CreateBoss); 
     43        level.SetObjectMethod("bossspawn", CreateBossSpawn); 
    4244        level.Execute(); 
    4345 
    4446        Level.Background.Color = Color.Black; 
     47    } 
     48 
     49    void CreateBossSpawn(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 
     50    { 
     51        bossSpawnPositions.Add(position); 
    4552    } 
    4653 
     
    5360        bossTimer.Timeout += delegate 
    5461        { 
    55              
     62            Vector pos = RandomGen.SelectOne<Vector>(bossSpawnPositions); 
     63            //CreateBossTrainPart(pos, ); 
    5664        }; 
    5765        bossTimer.Start(); 
     66    } 
     67 
     68    void CreateBossTrainPart(Vector position, Animation anim) 
     69    { 
     70        var part = PhysicsObject.CreateStaticObject(150, 70); 
     71        part.Position = position; 
     72        part.Animation = anim; 
     73        part.Animation.Start(); 
     74        part.Velocity = new Vector(-50, 0); 
     75        Add(part); 
    5876    } 
    5977 
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs

    r6703 r6704  
    7676    StoryItem[] storyItem = new StoryItem[3]; 
    7777 
     78    private List<Vector> bossSpawnPositions = new List<Vector>();  
     79 
    7880    private CycleSlot currentItem; // Laatikossa näkyvä nykyinen kama. 
    7981    private CycleSlot nextItem; // Seuraavan kaman kuva. 
     
    139141    private Animation coyoteDown; 
    140142 
    141     [AssetName("coyotedown")] 
    142     private Animation coyoteDown; 
    143     [AssetName("coyotedown")] 
    144     private Animation coyoteDown; 
     143    [AssetName("train")] 
     144    private Animation trainAnimation; 
     145    [AssetName("carriage")] 
     146    private Animation carriageAnimation; 
    145147 
    146148    #endregion 
Note: See TracChangeset for help on using the changeset viewer.