Changeset 6199


Ignore:
Timestamp:
2015-06-23 19:00:29 (4 years ago)
Author:
empaheik
Message:

Ryömiviä harmaita palikoita.

Location:
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs

    r6198 r6199  
    147147    } 
    148148 
    149     #region ElementCreation 
     149    #region LevelCreation 
    150150    void CreateLevel() 
    151151    { 
     
    163163        //level.SetTileMethod(Color.PaintDotNetBlue, CreateDummy, Color.PaintDotNetBlue);  
    164164        level.SetTileMethod(Color.DarkGray, CreateDummy, Color.DarkGray);   //TODO: CreateTombStone 
    165         level.SetTileMethod(Color.Gray, CreateDummy, Color.Gray);  //TODO: CreateCrawly 
     165        level.SetTileMethod(Color.Gray, CreateCrawly);   
    166166        level.SetTileMethod(Color.Red, CreateDummy, Color.Red);    //TODO: CreateWitch 
    167167        level.Execute(TILE_SIZE, TILE_SIZE); 
    168168        level.Optimize(Color.Black, Color.Brown); 
    169  
    170169 
    171170        //TileMap level = TileMap.FromLevelAsset("level" + levelNumber); 
     
    178177 
    179178        SetControls(); 
     179    } 
     180 
     181    void CreateCrawly(Vector position, double width, double height) 
     182    { 
     183        PlatformCharacter crawly = new PlatformCharacter(width * 2, height); 
     184        crawly.Position = position; 
     185        crawly.Color = Color.Gray; 
     186        crawly.CollisionIgnoreGroup = 3; 
     187        Add(crawly); 
     188 
     189        PlatformWandererBrain brain = new PlatformWandererBrain(); 
     190        brain.Speed = 20; 
     191        brain.FallsOffPlatforms = true; 
     192 
     193        crawly.Brain = brain; 
    180194    } 
    181195 
     
    260274    } 
    261275 
    262     void CreateGround(Vector position, double width, double height) 
     276    void CreateGround(Vector position, double width, double height) //TODO: Fiksataan se, että pelihahmot tietysti luiskahtavat tästä läpi, mikäli pääsevät sen sivustaan. Muitakin korjaustapoja tietty on, kuin tässä aliohjelmassa operoiminen. 
    263277    { 
    264278        GameObject ground = new GameObject(width, height); 
Note: See TracChangeset for help on using the changeset viewer.