示例#1
0
 public void RemoveTerrainManager()
 {
     // notify listeners that the level data was changed
     if (m_terrain != null && LE_EventInterface.OnChangeLevelData != null)
     {
         LE_EventInterface.OnChangeLevelData(m_terrain.gameObject, new LE_LevelDataChangedEvent(LE_ELevelDataChangeType.TERRAIN_SELECTION));
     }
     m_terrain    = null;
     m_terrainMgr = null;
 }
示例#2
0
        public void SetTerrain(Terrain p_terrain)
        {
            if (m_terrainMgr != null)
            {
                Debug.LogError("LE_GUI3dTerrain: SetTerrain: a terrain manager was already set and will be overwritten! Use 'RemoveTerrainManager' to reset the instance.");
            }
            m_terrain    = p_terrain;
            m_terrainMgr = new LE_TerrainManager(p_terrain.terrainData);

            // notify listeners that the level data was changed
            if (LE_EventInterface.OnChangeLevelData != null)
            {
                LE_EventInterface.OnChangeLevelData(m_terrain.gameObject, new LE_LevelDataChangedEvent(LE_ELevelDataChangeType.TERRAIN_SELECTION));
            }
        }
示例#3
0
        public LE_GenCmdTerrain(LE_GUI3dTerrain p_gui3d, LE_TerrainManager p_terrainMgr, Mode p_cmdMode)
        {
#if IS_DELAY_LOD_SUPPORTED
            m_gui3d = p_gui3d;
#endif
            m_terrainMgr = p_terrainMgr;
            m_cmdMode    = p_cmdMode;
            if (m_cmdMode == Mode.HEIGHTS_CMD)
            {
                m_heightsBeforeChange = p_terrainMgr.TerrainData.GetHeights(0, 0, p_terrainMgr.TerrainData.heightmapWidth, p_terrainMgr.TerrainData.heightmapHeight);
            }
            else
            {
                m_alphamapsBeforeChange = p_terrainMgr.TerrainData.GetAlphamaps(0, 0, p_terrainMgr.TerrainData.alphamapWidth, p_terrainMgr.TerrainData.alphamapHeight);
            }
            m_lastEditedFrame = Time.frameCount;
        }
 public LE_CmdChangeTerrainHeights(LE_TerrainManager p_terrainMgr, LE_TerrainManager.HeightData p_heightsDelta)
 {
     m_terrainMgr   = p_terrainMgr;
     m_heightsDelta = p_heightsDelta;
     m_isExecuted   = true;
 }
 public LE_CmdChangeTerrainAlphamaps(LE_TerrainManager p_terrainMgr, LE_TerrainManager.AlphamapData p_alphamapsDelta)
 {
     m_terrainMgr     = p_terrainMgr;
     m_alphamapsDelta = p_alphamapsDelta;
     m_isExecuted     = true;
 }