public void Init() { if (m_terrain == null) { m_terrain = new EPMDelaunayTerrain(); } if (m_materialAgent == null) { m_materialAgent = new EPMMaterialAgent(); foreach (EPMPoint.PointType t in System.Enum.GetValues(typeof(EPMPoint.PointType))) { Color color = EPMMaterialAgent.GetDefaultColor(t); g_typeColorDic.Add(t, color); m_materialAgent.SetColor(t, color); } } m_hillHalfWidth = 10f; m_roadHalfWidth = 4f; m_riverHalfWidth = 4f; m_islandBorderHalfWidth = 5f; m_mountainRadius = 30f; m_defaultHillHeight = 30f; m_defaultMountainHeight = 60f; }
public void SetColorByType(EPMPoint.PointType type, Color newColor) { if (m_materialAgent == null) { return; } g_typeColorDic[type] = newColor; m_materialAgent.SetColor(type, newColor); }