/// <summary> /// Called when turn change and check if is Pc turn to auto click on throw button /// </summary> /// <param name="_currentTurn">The _current turn.</param> /// private void OnTurnChanged(GameflowModel.TurnType _currentTurn) { if(_currentTurn == GameflowModel.TurnType.Pc) { OnClickThrow(); } }
public void ShowWinner(GameflowModel.TurnType _turnType) { Time.timeScale = 0f; Music.Stop(); PanelRoot.SetActive(true); if (_turnType == GameflowModel.TurnType.Pc) { TextWinnerPc.SetActive(true); } if (_turnType == GameflowModel.TurnType.Player) { TextWinnerPlayer.SetActive(true); } }
/// <summary> /// Create the game elements /// </summary> public override void Initialize() { m_gameflowModel = new GameflowModel(); CreateBoard(); SetupGameTimeView(); SetupPauseGameView(); SetupTurnView(); SetupDicesViews(); SetupTokensView(); SetupCameraController(); base.Initialize(); GetModel().StartGame(); }
private void OnTurnChanged(GameflowModel.TurnType _currentTurn) { switch(_currentTurn) { case GameflowModel.TurnType.Pc: ImageTurnColor.color = Color.blue; TextTurnName.text = ReferencesHolder.Instance.LocalizationManager.GetText(Tags.TURN_NAME_PC); break; case GameflowModel.TurnType.Player: ImageTurnColor.color = Color.red; TextTurnName.text = ReferencesHolder.Instance.LocalizationManager.GetText(Tags.TURN_NAME_PLAYER); break; } m_animator.Play(SHOW_ANIMATION_NAME); }