Click or drag to resize

IJointEventsListener Interface

Declares callbacks that are called when a joint between two parts is changed.

Namespace:  KSPDev.KSPInterfaces
Assembly:  KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntax
C#
public interface IJointEventsListener
Request Example View Source

The IJointEventsListener type exposes the following members.

Methods
  NameDescription
Public methodOnJointBreak
Triggers when connection is broken due to too strong force applied.
Top
Remarks
Events of this inteface are triggered by Unity engine via reflections. 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.
Examples
public class MyModule : PartModule, IJointEventsListener {
  /// <inheritdoc/>
  public void OnJointBreak(float breakForce) {
    Debug.LogInfoFormat("OnJointBreak: {0}", breakForce);
  }
}
See Also