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