public override void RespondToAttack(IProjectile attack)
        {
            this.Shields += 50;

            attack.Hit(this);

            this.Shields -= 50;
        }
Beispiel #2
0
 public virtual void RespondToAttack(IProjectile attack)
 {
     attack.Hit(this);
     if (this.Shields<0)
     {
         this.Shields = 0;
     }
     if (this.Health<0)
     {
         this.Health = 0;
     }
 }
Beispiel #3
0
        public override void RespondToAttack(IProjectile attack)
        {
            this.Shields += 50;

            attack.Hit(this);

            this.Shields -= 50;

            if (this.Health <= 0)
            {
                this.Health = 0;
                Console.WriteLine(Messages.ShipDestroyed, this.Name);
            }

            if (this.Shields <= 0)
            {
                this.Shields = 0;
            }
        }
Beispiel #4
0
 public virtual void RespondToAttack(IProjectile attack)
 {
     attack.Hit(this);
 }
Beispiel #5
0
 public virtual void RespondToAttack(IProjectile projectile)
 {
     projectile.Hit(this);
 }
Beispiel #6
0
        public virtual void RespondToAttack(IProjectile attack)
        {
            attack.Hit(this);

            if (this.Health <= 0)
            {
                this.Health = 0;
                Console.WriteLine(Messages.ShipDestroyed, this.Name);
            }

            if (this.Shields < 0)
            {
                this.Shields = 0;
            }
        }
Beispiel #7
0
 public override void RespondToAttack(IProjectile attack)
 {
     attack.Hit(this);
 }