public new void explode() { if (state == PartStates.DEAD) { return; } CreatureFXMonger.CreateCreatureExplosion(this); Debug.Log("Creature explosion of " + name); float distance = 0f; if (vessel == FlightGlobals.ActiveVessel) { distance = 0f; } else { distance = Vector3.Distance(partTransform.position, FlightGlobals.ActiveVessel.vesselTransform.position); } GameEvents.onPartExplode.Fire(new GameEvents.ExplosionReaction(distance, 0f)); Die(); }
private void Awake() { Instance = this; }