/// <summary> /// Stoping if is running. If you want lock runing forever, use <see cref="BreakForever"></see>/> /// </summary> public void Stop() { if (Mainer != null && Coroutine != null) { Mainer.StopCoroutine(Coroutine); } }
/// <summary> /// Run, it can be invoke only one time. /// </summary> /// <returns></returns> public bool Run() { if (HasStarted || IsBroken) { return(false); } HasStarted = true; if (Delay > TimeSpan.Zero) { Coroutine = Mainer.StartCoroutine(WaitAndInvoke()); } else { WhenEnd(); } return(true); }