Exemplo n.º 1
0
 public override void HandleCollisions(CollisionBody collider)
 {
     if (collider is Projectile)
     {
         Projectile collidingProjectile = collider as Projectile;
         if (!collidingProjectile.friendly)
         {
             Main.playerHealth -= 1;
             if (Main.playerHealth <= 0)
             {
                 dying = true;
             }
             Explosion.NewExplosion(collidingProjectile.position, Vector2.Zero);
             collidingProjectile.DestroyInstance(collidingProjectile);
         }
     }
 }
Exemplo n.º 2
0
 public virtual void HandleCollisions(CollisionBody collider)
 {
 }