Exemple #1
0
 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);
 }
Exemple #4
0
 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);
 }