示例#1
0
        public TileMap(string name, Tileset tileset, MapLayer baseLayer, CollisionLayer collisionLayer, PortalLayer portalLayer)
        {
            this.name = name;
            tilesets  = new List <Tileset>();
            tilesets.Add(tileset);

            this.portalLayer = portalLayer;

            mapLayers = new List <ILayer>();
            mapLayers.Add(baseLayer);

            mapWidth  = baseLayer.Width;
            mapHeight = baseLayer.Height;

            CollisionLayer = collisionLayer;
            SpawnPositions = new Dictionary <string, Portal>();
        }
示例#2
0
        public TileMap(string name, List <Tileset> tilesets, MapLayer baseLayer, MapLayer buildingLayer, MapLayer splatterLayer, CollisionLayer collisionLayer, PortalLayer portalLayer)
        {
            this.name      = name;
            this.tilesets  = tilesets;
            this.mapLayers = new List <ILayer>();

            this.portalLayer = portalLayer;

            mapLayers.Add(baseLayer);

            AddLayer(buildingLayer);
            AddLayer(splatterLayer);

            mapWidth  = baseLayer.Width;
            mapHeight = baseLayer.Height;

            CollisionLayer = collisionLayer;
            spawnPositions = new Dictionary <string, Portal>();
        }