Esempio n. 1
0
        private void BuildMap()
        {
            mapContext.SetMap(new IntVector2(sizeX, sizeY), new TilePosition(0, 1), new TilePosition(sizeX - 10, 1));

            var map = mapContext.map;

            for (int x = map.startTilePosition.x; x < map.endTilePosition.x; x++)
            {
                var tileEntity = gameContext.CreateEntity();
                tileEntity.AddTilePosition(new TilePosition(x, map.startTilePosition.y));
                tileEntity.AddTile(tileDefinitions["grass"]);
            }
        }