コード例 #1
0
ファイル: LeftButton.cs プロジェクト: Brokemia/madeline-party
        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;
            }
        }
コード例 #2
0
        private void DoBreakAction()
        {
            OnPressButton?.Invoke(currentMode);
            switch (currentMode)
            {
            case Modes.DoubleDice:
                SetCurrentMode(Modes.Inactive);
                board.RollDice(GetTokenID(), true);
                break;

            case Modes.CancelHeartBuy:
                board.SkipHeart();
                SetCurrentMode(Modes.Inactive);
                break;

            case Modes.CancelShopEnter:
                board.SkipShop();
                SetCurrentMode(Modes.Inactive);
                break;

            case Modes.CancelItemBuy:
                board.SkipItem();
                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;
            }
        }