예제 #1
0
 // 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);
     }
 }
예제 #2
0
    // 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;
        }
    }