private void generateElement(Dictionary <MapVector2, ElementType> dict) { foreach (var entry in dict) { var pos = entry.Key; var type = entry.Value; elementLayer[pos.x, pos.y] = type; switch (type) { case ElementType.None: break; case ElementType.Wall: m_Element.CreateUnit(m_WallUnitTemplate, pos); break; case ElementType.Target: m_Element.CreateUnit(m_TargetUnitTemplate, pos); break; case ElementType.Transport: break; } } }
private void generateTerrain(Dictionary <MapVector2, TerrainType> dict) { foreach (var entry in dict) { var pos = entry.Key; var type = entry.Value; terrainLayer[pos.x, pos.y] = type; switch (type) { case TerrainType.Ground: m_Terrain.CreateUnit(m_GroundUnitTemplate, pos); break; case TerrainType.Void: break; case TerrainType.Water: m_Terrain.CreateUnit(m_WaterUnitTemplate, pos); break; } } }