Ejemplo n.º 1
0
        public Map(MapDescription mapDescription)
        {
            WallManager.Instance.Walls.Clear();

            TilesAcross = mapDescription.TilesAcross;
            TilesDown = mapDescription.TilesDown;
            TileSize = mapDescription.TileSize;

            if (mapDescription.MapTiles.Length != TilesAcross * TilesDown)
                throw new System.InvalidOperationException("Map area is not "
                    + "equal to tiles across x tiles down! ("
                    + mapDescription.MapTiles.Length + " != "
                    + TilesAcross + " * " + TilesDown + ")");

            createTiles(mapDescription.MapTiles);

            createNavigationGraph();

            initializeSprites();

            inputTimer.Start();
        }
Ejemplo n.º 2
0
 public EditorMap(MapDescription mapDescription)
     : base(mapDescription)
 {
     mapGridlines = new MapGridlines(this);
 }