Example #1
0
 public Shot(Vector2 position, double radians, double mPerMs, double harmlessTime)
 {
     Position = new Vector2(position);
       Angle = radians;
       Speed = mPerMs;
       harmless = new Countdown(harmlessTime);
 }
Example #2
0
 public Plane(Vector2 position, double angle, double speed)
 {
     reloadedCountdown = new Countdown(1);
       reloadedCountdown.Tick(1);
       body = new RotatedBody2d();
       body.Position = position;
       body.Angle = angle;
       body.Velocity = Calc.Polar(angle, speed);
 }
Example #3
0
 public Shot Fire()
 {
     if (reloadedCountdown.Stopped)
       {
     reloadedCountdown = new Countdown(ReloadTimeMs);
     SystemSounds.Asterisk.Play();
     return new Shot(this.body.Position, this.body.Angle, Velocity() + MuzzleVelocity, HarmlessTime);
       }
       else
     return null;
 }