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