public static Run OnDelegate(SimpleEvent aDelegate, System.Action aAction) { var tmp = new Run(); tmp.action = _RunOnDelegate(tmp, aDelegate, aAction); tmp.Start(); return tmp; }
public bool Equals(SimpleEvent other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Name, _name); }
public void EventResponse(SimpleEvent simpleEvent) { hazards.Clear(); }
public void Handle(SimpleEvent evt) { TargetsCalled.Add(typeof(SimpleEvent)); MessageTypes.Add(evt.GetType()); }
protected void Unsubscribe(SimpleEvent e, Action action) { _eventManager.Unsubscribe(e, action); _simpleSubs.Remove(e); }
protected void Publish(SimpleEvent e) { _eventManager.Publish(e); }
public virtual void RaiseSimpleEvent() => SimpleEvent?.Invoke(this, EventArgs.Empty);
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 };
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); }
/// <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); }
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);
public void Invoke() { //I don't use null-conditional Operator ('?') to show events behaviour SimpleEvent.Invoke(this, new EventArgs()); }
void On(SimpleEvent @event) { SimpleEventHandled++; }
//Lista public void Publish(SimpleEvent simpleEvent) { // lista.Find() // foreach // r.OnEvent(simpleEvent) }