private void _init() { GameEngine = GetComponent <GameEngine>(); replayMenu = _replayMenuObj.GetComponent <ReplayMenu>(); replayMenu.GameUI = this; _levelCompleteMenu = _levelCompleteMenuObj.GetComponent <LevelCompleteMenu>(); _levelCompleteMenu.GameUI = this; _inited = true; }
public MenuController() { Console.CursorVisible = false; this.mainMenu = new MainMenu(); this.playersMenu = new PlayersMenu(); this.diceMenu = new DiceMenu(); this.replayMenu = new ReplayMenu(); this.mainMenu.Exit += this.OnExit; this.mainMenu.DisplayPlayersMenu += this.OnDisplayPlayersMenu; this.playersMenu.PlayersSelected += this.OnPlayersSelected; this.diceMenu.DiceSelected += this.OnDiceSelected; this.replayMenu.Exit += this.OnExit; this.replayMenu.DisplayMainMenu += this.OnDisplayMainMenu; this.replayMenu.Replay += this.OnReplay; }