private void OnTurnTimerUpdate(TurnTimerUpdate update, object userData) { this.m_countdownEndTimestamp = update.GetEndTimestamp(); if (!update.ShouldShow()) { if ((this.m_state == TurnTimerState.COUNTDOWN) || (this.m_state == TurnTimerState.START)) { this.ChangeState(TurnTimerState.KILL); } } else { float secondsRemaining = update.GetSecondsRemaining(); if (secondsRemaining <= Mathf.Epsilon) { this.OnTurnTimedOut(); } else if (this.m_state == TurnTimerState.COUNTDOWN) { this.RestartCountdownAnims(secondsRemaining); } else if (GameState.Get().IsTurnStartManagerActive()) { this.m_waitingForTurnStartManagerFinish = true; } else { this.ChangeState(TurnTimerState.START); } } }
private void OnTurnTimerUpdate(TurnTimerUpdate update, object userData) { if ((update.GetSecondsRemaining() > 0f) && GameState.Get().IsFriendlySidePlayerTurn()) { this.state = State.TurnCountdown; this.FireNotification(); } }