示例#1
0
        /// <summary>
        /// 駒の移動を開始します。
        /// </summary>
        private void BeginMovePiece(BoardPiece piece, Square square)
        {
            if (!CanBeginMove(piece.BWType))
            {
                return;
            }

            this.movingPiece = new MovingPiece(piece, square);

            if (EditMode != EditMode.Editing && EffectManager != null)
            {
                EffectManager.BeginMove(square, piece);
            }

            InManipulating = true;
        }
示例#2
0
        /// <summary>
        /// 駒の移動を終了します。
        /// </summary>
        public void EndMove()
        {
            if (this.movingPiece == null)
            {
                return;
            }

            this.movingPiece = null;
            ClosePromoteDialog();

            if (EffectManager != null)
            {
                EffectManager.EndMove();
            }

            InManipulating = false;
        }
示例#3
0
        /// <summary>
        /// 駒打ちの処理を開始します。
        /// </summary>
        private void BeginDropPiece(BoardPiece piece)
        {
            if (!CanBeginMove(piece.BWType))
            {
                return;
            }

            if (GetHandCount(piece.PieceType, piece.BWType) <= 0)
            {
                return;
            }

            // 表示用の駒を追加します。
            this.movingPiece = new MovingPiece(piece, null);

            if (EditMode != EditMode.Editing && EffectManager != null)
            {
                EffectManager.BeginMove(null, piece);
            }

            InManipulating = true;
        }
示例#4
0
        /// <summary>
        /// 駒の移動を終了します。
        /// </summary>
        public void EndMove()
        {
            if (this.movingPiece == null)
            {
                return;
            }

            this.movingPiece = null;
            ClosePromoteDialog();

            if (EffectManager != null)
            {
                EffectManager.EndMove();
            }

            InManipulating = false;
        }
示例#5
0
        /// <summary>
        /// 駒打ちの処理を開始します。
        /// </summary>
        private void BeginDropPiece(BoardPiece piece)
        {
            if (!CanBeginMove(piece.BWType))
            {
                return;
            }

            if (GetHandCount(piece.PieceType, piece.BWType) <= 0)
            {
                return;
            }

            // 表示用の駒を追加します。
            this.movingPiece = new MovingPiece(piece, null);

            if (EditMode != EditMode.Editing && EffectManager != null)
            {
                EffectManager.BeginMove(null, piece);
            }

            InManipulating = true;
        }
示例#6
0
        /// <summary>
        /// 駒の移動を開始します。
        /// </summary>
        private void BeginMovePiece(BoardPiece piece, Square square)
        {
            if (!CanBeginMove(piece.BWType))
            {
                return;
            }

            this.movingPiece = new MovingPiece(piece, square);

            if (EditMode != EditMode.Editing && EffectManager != null)
            {
                EffectManager.BeginMove(square, piece);
            }

            InManipulating = true;
        }