示例#1
0
 public void UnregisterPulseController(IGATPulseController controller)
 {
     if (controller.OnPulseControl != _onPulseControl)
     {
                         #if UNITY_EDITOR
         Debug.LogWarning("The registered controller must unregister itself.");
                         #endif
         return;
     }
     _onPulseControl = null;
 }
示例#2
0
        public void BindOnPulse(string id, OnPulseHandler script)
        {
            var key = $"{nameof(BindOnPulse)}{id}";

            if (_uniqueEventRegisteration.Contains(key))
            {
                return;
            }

            _uniqueEventRegisteration.Add(key);
            OnPulse += script;
        }
示例#3
0
 public bool RegisterPulseController(IGATPulseController controller)
 {
     if (_onPulseControl != null)
     {
                         #if UNITY_EDITOR
         Debug.LogWarning("There is already a registered controller for this pulse.");
                         #endif
         return(false);
     }
     _onPulseControl = controller.OnPulseControl;
     return(true);
 }
示例#4
0
 /// <summary>
 /// Unsubscribes to the pulse.
 /// </summary>
 public void UnsubscribeToPulse( IGATPulseClient client )
 {
     _onPulse -= client.OnPulse;
     _onStepsDidChange -= client.PulseStepsDidChange;
 }
示例#5
0
 public void UnregisterPulseController( IGATPulseController controller )
 {
     if( controller.OnPulseControl != _onPulseControl )
     {
         #if UNITY_EDITOR
         Debug.LogWarning( "The registered controller must unregister itself." );
         #endif
         return;
     }
     _onPulseControl = null;
 }
示例#6
0
 public bool RegisterPulseController( IGATPulseController controller )
 {
     if( _onPulseControl != null )
     {
         #if UNITY_EDITOR
         Debug.LogWarning( "There is already a registered controller for this pulse." );
         #endif
         return false;
     }
     _onPulseControl = controller.OnPulseControl;
     return true;
 }
示例#7
0
 public void BindOnPulse(OnPulseHandler script)
 {
     OnPulse += script;
 }
示例#8
0
 /// <summary>
 /// Unsubscribes to the pulse.
 /// </summary>
 public void UnsubscribeToPulse(IGATPulseClient client)
 {
     _onPulse          -= client.OnPulse;
     _onStepsDidChange -= client.PulseStepsDidChange;
 }