private IEnumerator CoStartTween(ETweenDirection eTweenDirection, OnCreateYield OnCreatorYield) { DoInitTween(eTweenDirection); while (_bIsFinishForward == _bIsFinishRevese) { DoSetTweening(); CustomYieldInstruction pYield; OnCreatorYield(out pYield); yield return(pYield); } if (p_Event_OnFinishTween != null) { p_Event_OnFinishTween.Invoke(); } }
private IEnumerator CoStartTween(bool bReset_Progress, ETweenDirection eTweenDirection, OnCreateYield OnCreatorYield, System.Func <float> OnGetDeltaTime) { if (p_fFirstDelaySec != 0f) { if (p_bIgnoreTimeScale) { yield return(new WaitForSecondsRealtime(p_fFirstDelaySec)); } else { yield return(YieldManager.GetWaitForSecond(p_fFirstDelaySec)); } } DoInitTween(eTweenDirection, bReset_Progress); if (p_Event_OnStartTween_InCludeArg != null) { p_Event_OnStartTween_InCludeArg(eTweenDirection, this); } while (_bIsFinishForward == _bIsFinishRevese) { DoSetTweening(OnGetDeltaTime()); CustomYieldInstruction pYield; OnCreatorYield(out pYield); yield return(pYield); } if (p_fAfterDelaySec != 0f) { if (p_bIgnoreTimeScale) { yield return(new WaitForSecondsRealtime(p_fAfterDelaySec)); } else { yield return(YieldManager.GetWaitForSecond(p_fAfterDelaySec)); } } if (p_Event_OnFinishTween != null) { p_Event_OnFinishTween.Invoke(); } if (p_Event_OnFinishTween_InCludeArg != null) { p_Event_OnFinishTween_InCludeArg(eTweenDirection, this); } _bIsPlayingTween = false; }