public void EndTurn() { m_CurrentTurnStep = TurnStep.Move; m_LowestTurnStep = TurnStep.None; SwitchCurrentPlayer(); }
public TurnState(MatchState match, string firstToMoveId) { m_PlayerOneId = match.PlayerOne.AccountIdentity; m_PlayerTwoId = match.PlayerTwo.AccountIdentity; SetCurrentPlayer(firstToMoveId); m_CurrentTurnStep = TurnStep.Move; }
public void SetCurrentStep(TurnStep turnStep) { if (m_LowestTurnStep < turnStep) { m_LowestTurnStep = m_CurrentTurnStep; m_CurrentTurnStep = turnStep; } if (turnStep == TurnStep.End) { EndTurn(); } }
public TurnState(string playerOneId, string playerTwoId) { m_PlayerOneId = playerOneId; m_PlayerTwoId = playerTwoId; if (RandomBoolean()) { SetCurrentPlayer(m_PlayerOneId); } else { SetCurrentPlayer(m_PlayerTwoId); } m_CurrentTurnStep = TurnStep.Move; }
public virtual void handleTurnStep(TurnStep step, float dt) { if (prevScale > nextScale) { this.scaleX = Mathf.Max(nextScale, this.scaleX - dt / step.durationInSeconds); } else { this.scaleX = Mathf.Min(nextScale, this.scaleX + dt / step.durationInSeconds); } if (this.scaleX == nextScale) { nextStep(); } }
internal static void UpdateTurnState(TurnStep step) { if (TestMode) { CurrentTurnState.SetCurrentStep(step); return; } if (CurrentTurnState == null) { Debug.LogFormat("Attempting To Update Null Turn State For Match ({0})", CurrentMatch.MatchIdentity); return; } if (CurrentTurnState.LowestTurnStep < step) { ClientManager.Instance.SendTurnUpdateCommand(CurrentMatch.MatchIdentity, (int)step); } }
internal void HandleTurnStepChange(TurnStep turnStep) { switch (turnStep) { case TurnStep.End: { if (!IsActivelyEngaged) { m_ParentBoard.ClearCurrentSelections(); m_Handler.ClearFocusPiece(); } break; } default: { Debug.LogFormat("Turn Step Case Invalid: {0}", turnStep.ToString()); break; } } }
public void SetLowestTurnStep(TurnStep turnStep) { m_LowestTurnStep = turnStep; }