예제 #1
0
 public override void MoveEnemy()
 {
     var move = new MovementCoordinates(transform, Target);
     if (AttemptMove(move.ShouldMoveX, move.ShouldMoveY))
     {
         return;
     }
     // if movement was unsuccessful, switch which axis to move on and attempt that.
     move.SwitchShouldMoveAxis();
     AttemptMove(move.ShouldMoveX, move.ShouldMoveY);
 }
예제 #2
0
 public override void MoveEnemy()
 {
     var move = new MovementCoordinates(transform, Target.transform);
     AttemptMove(move.ShouldMoveX, move.ShouldMoveY);
 }