Exemple #1
0
 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;
         }
     }
 }
 public void ChangeArea(string name)
 {
     CurrentArea = areas[name];
 }