public IEnumerator EventCoroutine(float time) { BeforeEvent.Invoke(); yield return(new WaitForSeconds(time)); AfterEvent.Invoke(); }
public void onAfterEvent(ref object data, EFAction action) { if (AfterEvent != null) { AfterEvent.Invoke(this, new EFEventArgs(ref data, action)); } }
public void Run() { var x = BeforeEvent?.Invoke(); Console.WriteLine($"Trigger Run Slepping {x} miliseconds"); Thread.Sleep(x ?? 1000); AfterEvent?.Invoke(); }
protected void OnEvent() => AfterEvent?.Invoke(this, EventArgs.Empty);