// Start is called before the first frame update void Start() { // Determines which scene is open switch (SceneManager.GetActiveScene().name) { case "Main Menu": IsLoadingLevel = false; MainMenuPanel.SetActive(true); ControlsPanel.SetActive(false); CreditsPanel.SetActive(false); LoadingPanel.SetActive(false); MusicCreditsTitle.SetActive(false); MusicCredits.SetActive(false); ArtCreditsTitle.SetActive(false); ArtCredits.SetActive(false); ProgrammingCreditsTitle.SetActive(false); ProgrammingCredits.SetActive(false); GameDesignCreditsTitle.SetActive(false); GameDesignCredits.SetActive(false); TutorialIndex = 0; break; case "Gamefield": IsLoadingLevel = false; // Holds the amount of time which has elapsed Seconds = 60.0f; WaveInProgress = true; // Holds the wave of enemies Wave = 1; // Determines whether the lose conditions of the game has been met PlayerHasLost = false; Direction = 0; InitiateCameras(); SelectedBarracks = Barracks[0]; UIBarracksBlocked.SetActive(false); UIPrompt.gameObject.SetActive(false); Currency = 1000; SpawnGates = GameObject.FindGameObjectsWithTag("Spawn Gate"); AutoAttack = true; break; } }
// Return Buttons // Closes all panels other than the Main Menu void Return() { if (ControlsPanel.activeSelf) { ControlsPanel.SetActive(false); } if (CreditsPanel.activeSelf) { CreditsPanel.SetActive(false); } MainMenuPanel.SetActive(true); }
// Opens the Controls Panel void Controls() { MainMenuPanel.SetActive(false); ControlsPanel.SetActive(true); }
public void Controls() { ControlsPanel.SetActive(true); }
public void Back() { CreditsPanel.SetActive(false); HelpPanel.SetActive(false); ControlsPanel.SetActive(false); }