コード例 #1
0
        public Bullet2D(string path, Vector2 position, Vector2 dimension, Jet owner, Vector2 target, float speed,
                        float damage)
            : base(path, position, dimension)
        {
            this.damage = damage;
            outOfArena  = false;
            this.speed  = speed;
            this.owner  = owner;

            direction = Physics.GetDirection(owner.position, target);
        }
コード例 #2
0
 public HighPenetratingBullet(Vector2 position, Jet owner, Vector2 target, float rotation, float speed)
     : base("bullet2", position, new Vector2(20, 20), owner, target, speed, 3.0f)
 {
     this.rotation = rotation;
 }
コード例 #3
0
 public Missile(Vector2 position, Jet owner, Vector2 target, float rotation, float speed)
     : base("missile", position, new Vector2(60, 60), owner, target, speed, 10)
 {
     this.rotation = rotation;
 }
コード例 #4
0
 public StandardBullet(Vector2 position, Jet owner, Vector2 target, float rotation, float speed)
     : base("ammo", position, new Vector2(20, 20), owner, target, speed, 1.0f)
 {
     this.rotation = rotation;
 }
コード例 #5
0
 public EnemyJet(string path, Vector2 position, float speed, float _maxHealth)
     : base(path, position, new Vector2(60, 60), speed, _maxHealth)
 {
     target = GameGlobals.playerJet;
     rand   = new Random();
 }
コード例 #6
0
 private bool HitsJet(Jet jet) =>
 Physics.GetDistance(position, jet.position) < jet.hitDistance;
コード例 #7
0
 public ImprovedBullet(Vector2 position, Jet owner, Vector2 target, float rotation, float speed)
     : base("bullet", position, new Vector2(20, 20), owner, target, speed, 2.0f)
 {
     this.rotation = rotation;
 }