示例#1
0
        private void HandleAction()
        {
            if (_controller.Act(GameAction.Rotate))
            {
                _block.Rotate();
                if (Intersect())
                {
                    _block.CounterRotate();
                }
            }

            if (_controller.Act(GameAction.Left))
            {
                _block.RPos--;
                if (Intersect())
                {
                    _block.RPos++;
                }
            }
            if (_controller.Act(GameAction.Right))
            {
                _block.RPos++;
                if (Intersect())
                {
                    _block.RPos--;
                }
            }
        }