예제 #1
0
        public void buildWorldMap()
        {
            WorldMapData worldMapData = new WorldMapData();

            Util.MeasureExecutionTime("world build", async() => {
                worldMapData = this.generateWorldMap();
                await Util.AsyncCreateJsonFile("/Data", "world_map", JsonUtility.ToJson(worldMapData, true));
            });
        }
예제 #2
0
        public async Task loadWorldMap()
        {
            var jsonData = await Util.AsyncLoadJsonFile("/Data", "world_map");

            WorldMapData worldMap = JsonUtility.FromJson <WorldMapData>(jsonData);

            this.row      = worldMap.row;
            this.col      = worldMap.column;
            this.cellSize = worldMap.cellSize;
            this.world    = worldMap.map;
        }