Esempio n. 1
0
 public virtual void HandleHit(Bullet bullet, Living sprite)
 {
     sprite.ApplyDamage(Damage);
     SpriteContainer.Remove(bullet);
     if (!sprite.IsAlive())
         SpriteContainer.Remove(sprite);
     afterSuccessfulHit(bullet, sprite);
 }
Esempio n. 2
0
        public void CheckHit(Bullet bullet, ISprite sprite)
        {
            if (sprite.Equals(Owner))
                return;

            if (!(sprite is Living))
                return;

            var livingSprite = sprite as Living;
            HandleHit(bullet, livingSprite);
        }
Esempio n. 3
0
 protected abstract void afterSuccessfulHit(Bullet bullet, Living sprite);
Esempio n. 4
0
 protected override void afterSuccessfulHit(Bullet bullet, Living sprite)
 {
 }