public override void CollisionResolution(GameObject Item) { if (Item.GetType().Equals(typeof(DamageBox))) { DamageBox temp = Item as DamageBox; if (!temp.Friendly()) { SoundManager.Instance().AddSound(new SFX("SFX\\explosion")); kinetics.ApplyForce(temp.kinetics.orientations.GetVecOrientation() * 30); } } if (Item.GetType().Equals(typeof(FireBall))) { FireBall temp = Item as FireBall; if (!temp.Friendly()) { SoundManager.Instance().AddSound(new SFX("SFX\\explosion")); } } }
public override void CollisionResolution(GameObject Item) { if (Item.GetType() == typeof(FireBall)) { DamageBox temp = Item as DamageBox; if (!temp.Friendly()) { if (hurtTimer.CurrentTime() == 0) { color = Color.Red; hurtTimer.Reset(); hurtTimer.Start(); } health.decrease(1); if (health.Health() <= 0) { Game1.exit = true; } SoundManager.Instance().AddSound(new SFX("SFX\\arrowhit")); } } }