Beispiel #1
0
        public IMapTileInfo CreateEmptyTileInfo(IntVector2 position)
        {
            MapTileInfo mapTileInfo = new MapTileInfo();

            mapTileInfo.Initialize(MapTileType.Empty, position, position);

            return(mapTileInfo);
        }
Beispiel #2
0
        MapTileInfo GetMapTileInfoFromData(JsonData jsonData)
        {
            MapTileInfo tileInfo;

            tileInfo = new MapTileInfo();
            tileInfo.Initialize((int)jsonData["Type"], GetIntVector2FromProperty(jsonData, "ViewPosition"),
                                GetIntVector2FromProperty(jsonData, "Index"));

            return(tileInfo);
        }
Beispiel #3
0
        public void InitializePlane(IntVector2 position)
        {
            MapTileInfo mapTileInfo;

            mapTileInfo = new MapTileInfo();
            mapTileInfo.Initialize(MapTileType.Square, position, position);
            _sectorTilesInfo[new IntVector2(position.x, position.y)] = mapTileInfo;

            mapTileInfo = new MapTileInfo();
            mapTileInfo.Initialize(MapTileType.Square, position, new IntVector2(position.x + 1, position.y));
            _sectorTilesInfo[new IntVector2(position.x + 1, position.y)] = mapTileInfo;

            mapTileInfo = new MapTileInfo();
            mapTileInfo.Initialize(MapTileType.Square, position, new IntVector2(position.x, position.y + 1));
            _sectorTilesInfo[new IntVector2(position.x, position.y + 1)] = mapTileInfo;

            mapTileInfo = new MapTileInfo();
            mapTileInfo.Initialize(MapTileType.Square, position, new IntVector2(position.x + 1, position.y + 1));
            _sectorTilesInfo[new IntVector2(position.x + 1, position.y + 1)] = mapTileInfo;
        }