public GameHudController() { _instance = this; _gameHudView = GameObject.Find("UI/Canvas/Panel_GameHud").GetComponent <GameHudViewPresenter>(); _gameHudView.Show(false); _pauseMenuView = GameObject.Find("UI/Canvas/Panel_PauseMenu").GetComponent <PauseMenuViewPresenter>(); _pauseMenuView.Show(false); _gameOverView = GameObject.Find("UI/Canvas/Panel_GameOver").GetComponent <GameOverViewPresenter>(); _gameOverView.Show(false); _gameEndView = GameObject.Find("UI/Canvas/Panel_GameEnd").GetComponent <GameEndViewPresenter>(); _gameEndView.Show(false); _gameHudView.PauseButton.Clicked += Pause; _pauseMenuView.ResumeButton.Clicked += Resume; _pauseMenuView.RestartButton.Clicked += Restart; _pauseMenuView.MainMenuButton.Clicked += GoToMainMenu; _gameOverView.AgainButton.Clicked += Restart; _gameOverView.MainMenuButton.Clicked += GoToMainMenu; _gameEndView.MainMenuButton.Clicked += GoToMainMenu; loadManager = (LoadManager)GameObject.Find("LoadManager").GetComponent(typeof(LoadManager)); }
public void ShowGameOver(bool show) { _gameOverView.Show(show); }