Example #1
0
 public static Run OnDelegate(SimpleEvent aDelegate, System.Action aAction)
 {
     var tmp = new Run();
     tmp.action = _RunOnDelegate(tmp, aDelegate, aAction);
     tmp.Start();
     return tmp;
 }
Example #2
0
		public bool Equals(SimpleEvent other)
		{
			if (ReferenceEquals(null, other))
				return false;
			if (ReferenceEquals(this, other))
				return true;
			return Equals(other.Name, _name);
		}
Example #3
0
 public void EventResponse(SimpleEvent simpleEvent)
 {
     hazards.Clear();
 }
Example #4
0
 public void Handle(SimpleEvent evt)
 {
     TargetsCalled.Add(typeof(SimpleEvent));
     MessageTypes.Add(evt.GetType());
 }
Example #5
0
 protected void Unsubscribe(SimpleEvent e, Action action)
 {
     _eventManager.Unsubscribe(e, action);
     _simpleSubs.Remove(e);
 }
Example #6
0
 protected void Publish(SimpleEvent e)
 {
     _eventManager.Publish(e);
 }
 public virtual void RaiseSimpleEvent() => SimpleEvent?.Invoke(this, EventArgs.Empty);
Example #8
0
 public void Fade(bool toggle, float delay = 0f, SimpleEvent callback = null)
 {
     _cg.interactable   = toggle;
     _cg.blocksRaycasts = toggle;
     _cg.DOFade(toggle ? 1f : 0f, 1f).SetDelay(delay).OnComplete(() => callback?.Invoke()).Play();
 }
 public void Process(SimpleEvent @event)
 {
     ProcessCalled = true;
     EventPassed   = @event;
 }
 public static void Push(SimpleEvent e)
 {
     S_Pool.Free(e);
 }
 void On(SimpleEvent simpleEvent)
 {
     EventApplied = true;
     Value        = simpleEvent.Content;
 }
 IMessage OnSimpleEvent(SimpleEvent message) => new SimpleIntegrationEvent
 {
     Content = message.Content
 };
Example #13
0
 public void EventResponse(SimpleEvent simpleEvent)
 {
     maxHeightReached = -1;
     text.SetValue("0");
 }
 /// <summary>
 /// Dispatch an event out of an EventDispatcher inside a specific Channel
 /// </summary>
 /// <param name="channel">The channel name you want to dispatch</param>
 /// <param name="eventId">The event identification to dispatch</param>
 /// <param name="evt">The event data object</param>
 public void DispatchEvent(string channel, string eventId, SimpleEvent evt)
 {
     GetChannel(channel).DispatchEvent(eventId, evt);
 }
Example #15
0
 /// <summary>
 /// Dispatch and call all the actions related to this event
 /// </summary>
 /// <param name="eventId">The event identification</param>
 /// <param name="evt">The data to be passed to the actions</param>
 public void DispatchEvent(string eventId, SimpleEvent evt)
 {
     m_EventDispatcher.DispatchEvent(eventId, evt);
 }
Example #16
0
 private static IEnumerator _RunOnDelegate(Run aRun, SimpleEvent aDelegate, System.Action aAction)
 {
     aRun.isDone = false;
     System.Action action = () => {
         aAction();
     };
     aDelegate.Add(action);
     while (!aRun.abort && aAction != null)
     {
         yield return null;
     }
     aDelegate.Remove(action);
     aRun.isDone = true;
 }
 public void OnSimpleEvent(bool parallel) => SimpleEvent?.SafeInvoke(this, EventArgs.Empty, parallel);
Example #18
0
 public void Invoke()
 {
     //I don't use null-conditional Operator ('?') to show events behaviour
     SimpleEvent.Invoke(this, new EventArgs());
 }
 void On(SimpleEvent @event)
 {
     SimpleEventHandled++;
 }
Example #20
0
 //Lista
 public void Publish(SimpleEvent simpleEvent)
 {
     // lista.Find()
     // foreach
     // r.OnEvent(simpleEvent)
 }