KMWidget - Qkrisi/ktanemodkit GitHub Wiki

KMWidget

[DisallowMultipleComponent]
public class KMWidget : MonoBehaviour

Add this component to the object, to use it as a widget on the bomb (like the serial number, batteries, etc.)


public int SizeX;

The horizontal size of the widget. Usually 1 or 2 units.


public int SizeZ;

The vertical size of the widget. Usually 1 or 2 units.


public KMWidgetActivateDelegate OnWidgetActivate;

Delegate that gets called when all the widgets are spawned, and can be activated (will be called before the OnActivate delegate of modules)

Delegate signature: delegate void KMWidgetActivateDelegate()


public KMWidgetQueryDelegate OnQueryRequest;

Will be called when a module requests a query from this widget.

Delegate signature: delegate string KMWidgetQueryDelegate(string queryKey, string queryInfo)

Return value is the state of this widget.

(More in KMBombInfo)


public static Vector3 BaseSize = new Vector3(0.06f, 0.03f, 0.06f);

Base size of the widgets