コード例 #1
0
 void GenerateRegionMeshes()
 {
     foreach (WorldMap map in regionMaps.world_maps)
     {
         DFCoord2d pos = new DFCoord2d(map.map_x, map.map_y);
         if (DetailRegions.ContainsKey(pos))
         {
             //Debug.Log("Region exists: " + pos.x + ", " + pos.y);
             continue;
         }
         RegionMaker region = Instantiate <RegionMaker>(regionPrefab);
         region.CopyFromRemote(map, DFConnection.Instance.NetMapInfo);
         region.name             = region.worldNameEnglish;
         region.transform.parent = transform;
         DetailRegions[pos]      = region;
     }
 }
コード例 #2
0
    void GenerateRegionMeshes()
    {
        if (!GameSettings.Instance.rendering.drawDistantTerrain)
        {
            return;
        }

        foreach (WorldMap map in regionMaps.world_maps)
        {
            DFCoord2d pos = new DFCoord2d(map.map_x, map.map_y);
            if (DetailRegions.ContainsKey(pos))
            {
                continue;
            }
            RegionMaker region = Instantiate <RegionMaker>(regionPrefab);
            region.CopyFromRemote(map, worldMap);
            region.name             = region.worldNameEnglish;
            region.transform.parent = transform;
            DetailRegions[pos]      = region;
        }
    }