public void PopulateTypeContainers() { //load all the things //HACK: These loaders are hard coded for now. They should load from IO for mod support. LoadTerrainTypes(); LoadPropertyTypes(); LoadSquadTypes(); chosenTerrainType = TypeContainer <TerrainType> .get("Water"); DebugTerrainType = chosenTerrainType.gameplayData.name; }
private void OnChooseSquad(GameObject go) { string text = go.name; if (text == null) { return; } chosenSquadType = TypeContainer <SquadType> .get(text); mode = LevelEditorMode.Squad; }
private void OnChooseProperty(GameObject go) { string text = go.name; if (text == null) { return; } chosenPropertyType = TypeContainer <PropertyType> .get(text); mode = LevelEditorMode.Property; }
private void OnChooseTerrain(GameObject go) { string text = go.name; //go.GetComponent<UITooltip>().text.text; if (text == null) { return; } chosenTerrainType = TypeContainer <TerrainType> .get(text); mode = LevelEditorMode.Terrain; }
void generateNodes() { //Debug.Log( width ); //Debug.Log( length ); TerrainType terra = TypeContainer <TerrainType> .get("Plain"); //Debug.Log( "TERRAIN TYPE OF TERRA IS " + terra.staticDataame ); Node n; for (int x = 0; x < width; x++) { for (int z = 0; z < length; z++) { n = new Node(terra, new Vector3(x, 0f, z)); nodes[x, z] = n; } } for (int x = 0; x < width; x++) { for (int z = 0; z < length; z++) { n = getNodeUnsafely(x, z); n.AssignEdges(); n.terrain.autoWall(); if (z == 0 || z == length - 1) { SquadInstance.Create(getNodeUnsafely(x, z), TypeContainer <SquadType> .get("placeholder squad")); } } } }