public static void ChangeShowState() { Main.instance.terrainMat.SetFloat("_BorderMod", showstate?1:0); for (int i = 0; i < state.Count; i++) { state[i].SetNameStatus(!showstate); foreach (Army army in state[i].army) { if (!army.Fogged) { army.Active = !showstate; } } } for (int i = 0; i < regions.Count; i++) { regions[i].StateBorder = showstate; } if (Main.mapMode == MapMode.Terrain) { if (showstate) { Main.instance.Trees.gameObject.SetActive(false); } else { Main.instance.Trees.gameObject.SetActive(true); foreach (Transform tree in Main.instance.Trees) { MapMetrics.UpdateTree(tree.gameObject); } } } }
public void SetMapMode(MapMode mode) { if (mode == mapMode) { return; } if (mode == MapMode.Terrain) { terrainMat.SetFloat("_TerrainMode", 1); if (!CameraController.showstate) { Trees.gameObject.SetActive(true); foreach (Transform tree in Trees) { MapMetrics.UpdateTree(tree.gameObject); } } } if (mode == MapMode.Politic) { terrainMat.SetTexture("_MainTex", regionMap); terrainMat.SetTexture("_OccupeMap", occupationMap); terrainMat.SetFloat("_TerrainMode", 0); Trees.gameObject.SetActive(false); } mapMode = mode; }