void OnBeginGUI(UIState state) { if (state == UIState.GameUI) { game.settings.UI.GameUI.MainPanel.gameObject.SetActive(true); } if (state == UIState.ScrumUI) { game.settings.UI.ScrumUI.ScrumPanel.gameObject.SetActive(true); } if (state == UIState.EndUI) { game.settings.UI.EndUI.EndPanel.gameObject.SetActive(true); EndUISettings settings = game.settings.UI.EndUI; settings.Draw.gameObject.SetActive(false); settings.JapanWins.gameObject.SetActive(false); settings.MaoriWins.gameObject.SetActive(false); settings.FlagMaori.SetActive(false); settings.FlagJap.SetActive(false); settings.MaoriWin.SetActive(false); settings.JapanWin.SetActive(false); settings.DegradeCam.SetActive(true); } if (state == UIState.TouchUI) { touchUi.StartUI(); } }
public void DrawUI() { Game _game = Game.instance; EndUISettings settings = _game.settings.UI.EndUI; if (_game.southTeam.nbPoints < _game.northTeam.nbPoints) { settings.MaoriWins.gameObject.SetActive(true); settings.MaoriWin.SetActive(true); settings.FlagMaori.SetActive(true); } else if (_game.northTeam.nbPoints < _game.southTeam.nbPoints) { settings.JapanWins.gameObject.SetActive(true); settings.JapanWin.SetActive(true); settings.FlagJap.SetActive(true); } else { settings.Draw.gameObject.SetActive(true); } settings.NorthScore.number = _game.northTeam.nbPoints; settings.SouthScore.number = _game.southTeam.nbPoints; if (_game.northTeam.Player.XboxController.GetButtonDown(_game.settings.Inputs.shortPass.xbox) || _game.southTeam.Player.XboxController.GetButtonDown(_game.settings.Inputs.shortPass.xbox) || Input.GetKeyDown(_game.settings.Inputs.shortPass.keyboardP1) || Input.GetKeyDown(_game.settings.Inputs.shortPass.keyboardP2)) { settings.Abtn.SetActive(false); //settings.fade.Inverse(); //Timer.AddTimer(2, () => //{ _game.refs.managers.ui.currentState = UIManager.UIState.NULL; //}); } }