예제 #1
0
 /// <summary>
 /// Starts listening for events
 /// </summary>
 public virtual void OnEnable()
 {
     if (!_listening)
     {
         _listening = true;
         MMDebugMenuCheckboxEvent.Register(OnMMDebugMenuCheckboxEvent);
     }
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
 /// <summary>
 /// Triggers an event when the checkbox gets unchecked and becomes false
 /// </summary>
 public virtual void TriggerCheckboxEventFalse()
 {
     MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, false);
 }
예제 #4
0
 /// <summary>
 /// Triggers an event when the checkbox gets checked and becomes true
 /// </summary>
 public virtual void TriggerCheckboxEventTrue()
 {
     MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, true);
 }
예제 #5
0
 /// <summary>
 /// Triggers an event when the checkbox gets pressed
 /// </summary>
 public virtual void TriggerCheckboxEvent()
 {
     MMDebugMenuCheckboxEvent.Trigger(CheckboxEventName, Switch.SwitchState);
 }
예제 #6
0
 /// <summary>
 /// Stops listening for events
 /// </summary>
 public virtual void OnDestroy()
 {
     _listening = false;
     MMDebugMenuCheckboxEvent.Unregister(OnMMDebugMenuCheckboxEvent);
 }
예제 #7
0
 /// <summary>
 /// Stops listening for events
 /// </summary>
 public virtual void OnDisable()
 {
     MMDebugMenuCheckboxEvent.Unregister(OnMMDebugMenuCheckboxEvent);
 }
예제 #8
0
 /// <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);
 }