public override void CollisionResolution(GameObject Item) { if (Item.GetType().Equals(typeof(Avatar))) { } if (Item.GetType().Equals(typeof(FireBall))) { FireBall temp = Item as FireBall; if (temp.Friendly()) { SoundManager.Instance().AddSound(new SFX("SFX\\explosion")); this.HP = -1; } } }
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().Equals(typeof(Avatar))) { } if (Item.GetType().Equals(typeof(FireBall))) { FireBall temp = Item as FireBall; if (temp.Friendly()) { SoundManager.Instance().AddSound(new SFX("SFX\\explosion")); float test = Vector2.Dot(kinetics.orientations.GetVecOrientation(), temp.kinetics.orientations.GetVecOrientation()); if (test < 0) { HP -= 1; } else { HP = 0; } } } }