// Moves us to the new year. public void NewYear() { day = 0; year += 1; mouseController.UpdateTheDate(); TheWorld.NewYear(); if (currentView == "Habitat") { MeshRenderer meshRenderer = GetComponent <MeshRenderer>(); meshRenderer.sharedMaterial.mainTexture = WorldView.BuildHabitatTexture(TheWorld, textureMap); } }
// Toggles between the two world display methods public void ToggleView() { MeshRenderer meshRenderer = GetComponent <MeshRenderer>(); switch (currentView) { case "Elevation": meshRenderer.sharedMaterial.mainTexture = WorldView.BuildHabitatTexture(TheWorld, textureMap); mouseController.ToggleButtonDisplayName(currentView); currentView = "Habitat"; Debug.Log("Habitat View Made!"); break; case "Habitat": meshRenderer.sharedMaterial.mainTexture = WorldView.BuildElevationTexture(TheWorld); mouseController.ToggleButtonDisplayName(currentView); currentView = "Elevation"; Debug.Log("Elevation View Made!"); break; } }