KMNeedyModule - Qkrisi/ktanemodkit GitHub Wiki
KMNeedyModule
[DisallowMultipleComponent]
public class KMNeedyModule : MonoBehaviour
Component for needy modules on the bomb.
A module should have a KMSelectable component as well.
public float CountdownTime = 40f;
The number of seconds the player has to solve the needy when it's activated.
public float ResetDelayMin = 10.0f;
The minimum number of seconds before the needy module will reset.
public float ResetDelayMax = 40.0f;
The maximum number of seconds before the needy module will reset.
public string ModuleType;
ID of the module
public string ModuleDisplayName;
Name of the module
public bool RequiresTimerVisibility;
If set to true
, the module will always spawn on the same side as the timer.
public bool WarnAtFiveSeconds = true;
If set to true
, the module will make audio warnings when the countdown reaches 5 seconds.
public KMNeedyActivationEvent OnNeedyActivation;
Delegate fired when the needy activates.
Delegate signature: delegate void KMNeedyActivationEvent()
public KMNeedyDeactivationEvent OnNeedyDeactivation;
Delegate fired when the needy deactivates (usually when the bomb gets solved or explodes).
Delegate signature: delegate void KMNeedyDeactivationEvent()
public KMTimerExpiredEvent OnTimerExpired;
Delegate fired when the timer on the needy expires.
Delegate signature: delegate void KMTimerExpiredEvent()
public KMModuleActivateEvent OnActivate;
Delegate fired when every module on the bomb is spawned and the timer has started (and the lights turn on).
Delegate signature: delegate void KMModuleActivateEvent()
public void HandlePass()
Calling this will deactivate the needy.
public void HandleStrike()
Calling this will register a strike on the bomb.
public int GetRuleGenerationSeed()
Returns the random seed used to generate the rules for this game. Not currently used.
public void SetNeedyTimeRemaining(float newTime)
Changes the value of the countdown (seconds).
This will have no effect if timer isn't active.
public float GetNeedyTimeRemaining()
Returns the number of seconds left on the countdown.