} // end of CheckCollisions() public void HitTarget(GameThing hitThing, HitInfo hitInfo) { if (hitThing != null) { // Tell the launcher what we hit. launcher.OnMissileHit(hitThing, hitInfo.Center, verbPayload, damage); // Apply the damage to the target. // We only need to do this if the launcher is dead. Otherwise the above // notification will get processed and the damage will be taken into // account there. Yes, this is kind of confusing and should be rethought // and cleaned up. // TODO (****) if (Launcher.CurrentState == GameThing.State.Inactive) { bool targetDied = false; hitThing.DoDamage(-damage, verbPayload, true, false, Launcher, out targetDied); } // Kill off the missile. missile.Deactivate(); // Gratuitous effects. PlayExplodeEffect(hitInfo.Center); } } // end of HitTarget()
private void RemoveCreatableFromScene(GameActor actor) { // Will remove itself from gameThingList when deactivated in Refresh method. actor.Deactivate(); actor.CreatableAura = null; }