예제 #1
0
 public GameMap(MapManager mapManager, JsonMap jsonMap)
 {
     myMapManager = mapManager;
     Name = jsonMap.Name;
     MapWidth = jsonMap.MapWidth;
     MapHeight = jsonMap.MapHeight;
     TileMap = new Tile[MapWidth][];
     CollisionMap = new CollisionType[MapWidth][];
     for (int x = 0; x < MapWidth; x++) {
         TileMap[x] = new Tile[MapHeight];
         CollisionMap[x] = new CollisionType[MapHeight];
         for (int y = 0; y < MapHeight; y++) {
             string key = jsonMap.TileMap[x][y];
             var tile = myMapManager.myGameManager.TileManager.GetTileByKey(key);
             TileMap[x][y] = tile;
             CollisionMap[x][y] = tile.Collision;
         }
     }
 }
예제 #2
0
 public GameManager()
 {
     TileManager = new TileManager(this);
     MapManager = new MapManager(this, 400, 400);
     UnitManager = new UnitManager(this);
 }
예제 #3
0
 public DrawGameMap(MapManager mapManager, JsonMap jsonMap)
     : base(mapManager, jsonMap)
 {
 }