예제 #1
0
파일: Shot.cs 프로젝트: Aspent/CourseWork
 public Shot(float x, float y, Vector2 direction, Person owner)
 {
     _x = x;
     _y = y;
     _direction = direction;
     _isRemoved = false;
     _owner = owner;
     _range = owner.ShotChar.Range;
 }
예제 #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 MoveRight(Person player, Room room)
 {
     var direction = new Vector2(1, 0);
     if (player.CanMove(direction, room))
     {
         player.Move(direction);
     }
 }