コード例 #1
0
        public void ResetNeighbors()
        {
            for (int i = 0; i < terrains.Count; i++)
            {
                TCUnityTerrain t = terrains[i];
                if (!t.CheckValidUnityTerrain())
                {
                    continue;
                }

                t.terrain.SetNeighbors(null, null, null, null);
            }
        }
コード例 #2
0
        public void ResetNeighbors()
        {
#if UNITY_5 || UNITY_2017 || UNITY_2018_1 || UNITY_2018_2
            for (int i = 0; i < terrains.Count; i++)
            {
                TCUnityTerrain t = terrains[i];
                if (!t.CheckValidUnityTerrain())
                {
                    continue;
                }

                t.terrain.SetNeighbors(null, null, null, null);
            }
#endif
        }
コード例 #3
0
        public void SetNeighbors()
        {
            for (int i = 0; i < terrains.Count; i++)
            {
                TCUnityTerrain t = terrains[i];
                if (!t.CheckValidUnityTerrain())
                {
                    continue;
                }

                Terrain top    = GetTerrainTile(t.tileX, t.tileZ + 1);
                Terrain right  = GetTerrainTile(t.tileX + 1, t.tileZ);
                Terrain bottom = GetTerrainTile(t.tileX, t.tileZ - 1);
                Terrain left   = GetTerrainTile(t.tileX - 1, t.tileZ);

                t.terrain.SetNeighbors(left, top, right, bottom);
            }
        }