コード例 #1
0
ファイル: Zone.cs プロジェクト: TheCommieDuck/OldProjects
 public Zone(Area area)
 {
     Random r = new Random();
     this.Grass = new TileData();
     this.Water = new TileData();
     Grass.Sprite = new Graphics.Sprite("grass");
     Water.Sprite = new Graphics.Sprite("water");
     this.area = area;
     this.World = area.World;
     tileMap = new TileData[(int)area.ZoneSize.X, (int)area.ZoneSize.Y];
     for (int y = 0; y < tileMap.GetLength(0); ++y)
     {
         for (int x = 0; x < tileMap.GetLength(1); ++x)
         {
             tileMap[y, x] = (x == 0) ? this.Grass : this.Water;
         }
     }
 }
コード例 #2
0
 public void ChangeArea(string name)
 {
     CurrentArea = areas[name];
 }