IsPartDeathListener Interface |
Interface to notify about the part's forced destruction.
Namespace:
KSPDev.KSPInterfaces
Assembly:
KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
SyntaxThe IsPartDeathListener type exposes the following members.
Methods
| Name | Description |
---|
 | OnPartDie | Triggers when part ois destroyed by the game's logic. |
Top
Remarks
Events of this inteface are triggered by the KSP engine via Unity messaging mechanism. It's not
required for the module to implement the interface to be notified but by implementing it the
code becomes more consistent and less error prone.
Examplespublic class MyModule : PartModule, IsPartDeathListener {
public virtual void OnPartDie() {
Debug.LogFromat("OnPartDie: {0}", part.name);
}
}
See Also