Пример #1
0
        private void DoBreakAction()
        {
            OnPressButton?.Invoke(currentMode);
            switch (currentMode)
            {
            case Modes.Dice:
                SetCurrentMode(Modes.Inactive);
                if (board != null)
                {
                    board.RollDice(GetTokenID());
                }
                else if (level.Entities.FindFirst <TiebreakerController>() is TiebreakerController controller)
                {
                    controller.RollDice(Position, GameData.Instance.realPlayerID);
                }
                break;

            case Modes.ConfirmHeartBuy:
                board.BuyHeart();
                SetCurrentMode(Modes.Inactive);
                break;

            case Modes.ConfirmShopEnter:
                board.EnterShop();
                break;

            case Modes.ConfirmItemBuy:
                board.BuyItem();
                SetCurrentMode(Modes.Inactive);
                break;

            case Modes.Up:
                board.ContinueMovementAfterIntersection(BoardController.Direction.Up);
                break;

            case Modes.Down:
                board.ContinueMovementAfterIntersection(BoardController.Direction.Down);
                break;

            case Modes.Left:
                board.ContinueMovementAfterIntersection(BoardController.Direction.Left);
                break;

            case Modes.Right:
                board.ContinueMovementAfterIntersection(BoardController.Direction.Right);
                break;
            }
        }