示例#1
0
        private void MoveRight(Person player, Room room)
        {
            var direction = new Vector2(1, 0);

            if (player.CanMove(direction, room))
            {
                player.Move(direction);
            }
        }
示例#2
0
        private void MoveDown(Person player, Room room)
        {
            var direction = new Vector2(0, -1);

            if (player.CanMove(direction, room))
            {
                player.Move(direction);
            }
        }
示例#3
0
 private void MoveDown(Person player, Room room)
 {
     var direction = new Vector2(0, -1);
     if (player.CanMove(direction, room))
     {
         player.Move(direction);
     }
 }
示例#4
0
 private void MoveRight(Person player, Room room)
 {
     var direction = new Vector2(1, 0);
     if (player.CanMove(direction, room))
     {
         player.Move(direction);
     }
 }