Example #1
0
 public static Location InterceptLocation(this Elf source, MapObject target)
 {
     if (target is GameObject)
     {
         return(LastPosition.GetInterceptLocation(source, (GameObject)target));
     }
     else
     {
         return(target.GetLocation());
     }
 }
Example #2
0
 public static void MoveToIntercept(this Elf elf, MapObject target)
 {
     if (target is GameObject)
     {
         Location interceptLocation = LastPosition.GetInterceptLocation(elf, (GameObject)target);
         elf.MoveTo(interceptLocation);
     }
     else
     {
         elf.MoveTo(target);
     }
 }