예제 #1
0
 /*public TileMap(Tile[,] m)
 {
 Map = m;
 }*/
 public TileMap(int[,] existingMap, bool[,] existingCollisionMap)
 {
     Map = new Tile[existingMap.GetLength(0), existingMap.GetLength(1)];
       for (int x = 0; x < Map.GetLength(0); x++)
       {
     for (int y = 0; y < Map.GetLength(1); y++)
     {
       Map[x, y] = new Tile(existingCollisionMap[x, y], existingMap[x, y], Tile.calcID(x, y));
     }
       }
       EntityList = new List<Entity>();
 }
예제 #2
0
 public TileMap(int[,] existingMap, int[,] existingCollisionMap)
 {
     Map = new Tile[existingMap.GetLength(0), existingMap.GetLength(1)];
       for (int x = 0; x < Map.GetLength(0); x++)
       {
     for (int y = 0; y < Map.GetLength(1); y++)
     {
       Map[x, y] = new Tile(existingCollisionMap[x, y], existingMap[x, y], Tile.calcID(x, y));
       //Console.Write(existingMap[x, y] + ", ");
     }
     //Console.Write("\n");
       }
       EntityList = new List<Entity>();
 }