Beispiel #1
0
        private void UpdateButtons()
        {
            TurnController currentTurn = CurrentTurn();

            // end button
            _buttonEndTurn.IsInteractable = currentTurn != null && currentTurn.CanEndTurn();

            // delay button
            if (currentTurn != null && currentTurn.CanDelay())
            {
                _buttonDelay.IsInteractable = true;
            }
            else
            {
                _buttonDelay.IsInteractable = false;
                _buttonDelay.IsPressed      = false;
            }

            // 5-foot step button
            if (currentTurn != null)
            {
                _buttonFiveFoorStep.IsInteractable = currentTurn.CanToggleFiveFootStep();
                _buttonFiveFoorStep.IsPressed      = currentTurn.EnabledFiveFootStep;
            }
            else
            {
                _buttonFiveFoorStep.IsInteractable = false;
                _buttonFiveFoorStep.IsPressed      = false;
            }

            // full attack button
            if (currentTurn != null)
            {
                _buttonFullAttack.IsInteractable = currentTurn.CanToggleFullAttack();
                _buttonFullAttack.IsPressed      = currentTurn.EnabledFullAttack;
            }
            else
            {
                _buttonFullAttack.IsInteractable = false;
                _buttonFullAttack.IsPressed      = false;
            }
        }