/// <summary> /// Starts listening for events /// </summary> public virtual void OnEnable() { if (!_listening) { _listening = true; MMDebugMenuCheckboxEvent.Register(OnMMDebugMenuCheckboxEvent); } }
/// <summary> /// Triggers an event when the checkbox gets unchecked and becomes false /// </summary> public virtual void TriggerCheckboxEventFalse() { if (_valueSetThisFrame) { _valueSetThisFrame = false; return; } MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, false, MMDebugMenuCheckboxEvent.EventModes.FromCheckbox); }
/// <summary> /// Triggers an event when the checkbox gets unchecked and becomes false /// </summary> public virtual void TriggerCheckboxEventFalse() { MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, false); }
/// <summary> /// Triggers an event when the checkbox gets checked and becomes true /// </summary> public virtual void TriggerCheckboxEventTrue() { MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, true); }
/// <summary> /// Triggers an event when the checkbox gets pressed /// </summary> public virtual void TriggerCheckboxEvent() { MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, Switch.SwitchState); }
/// <summary> /// Stops listening for events /// </summary> public virtual void OnDestroy() { _listening = false; MMDebugMenuCheckboxEvent.Unregister(OnMMDebugMenuCheckboxEvent); }
/// <summary> /// Stops listening for events /// </summary> public virtual void OnDisable() { MMDebugMenuCheckboxEvent.Unregister(OnMMDebugMenuCheckboxEvent); }
/// <summary> /// Starts listening for events /// </summary> public virtual void OnEnable() { MMDebugMenuCheckboxEvent.Register(OnMMDebugMenuCheckboxEvent); }
/// <summary> /// This test methods will send a set event to all checkboxes bound to the CheckboxEventName /// </summary> protected virtual void TestSetValue() { MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, TestValue, MMDebugMenuCheckboxEvent.EventModes.SetCheckbox); }