예제 #1
0
 public MovingBehavior(FlyingObject flyingObject)
 {
     this.flyingObject = flyingObject;
 }
예제 #2
0
 public MovingAndDodgingBehavior(FlyingObject source, IEnumerable <FlyingObject> objectsToDodge)
 {
     this.source         = source;
     this.objectsToDodge = objectsToDodge;
 }
예제 #3
0
 public static int DistanceBetween(FlyingObject source, FlyingObject target)
 {
     return(source.Position.DistanceTo(target.Position) - source.Size.Width - target.Size.Width);
 }
예제 #4
0
 public ShootingBehavior(FlyingObject source, FlyingObject target)
 {
     this.source = source;
     this.target = target;
 }
예제 #5
0
 public static bool DoesTouchGround(FlyingObject source)
 {
     return(!(source is Bird) && source.Position.Y + source.Size.Height / 2 >= GameController.AirFieldSize.Height);
 }