/// <summary> /// Raises the <see cref="E:RefreshPath" /> event. /// </summary> /// <param name="e">The <see cref="CurvyCGEventArgs"/> instance containing the event data.</param> protected virtual void OnRefreshPath(CurvyCGEventArgs e) { if (Path == null || e.Module != Path.Module) { e.Module.OnRefresh.RemoveListener(OnRefreshPath); } else { if (Active) { if (Application.isPlaying) { if (mKeepDistanceAt > 0 && IsInitialized && IsPlaying) { AbsolutePosition = mKeepDistanceAt; mKeepDistanceAt = 0; } if (Speed == 0) { Refresh(); } } else if (IsInitialized) // Align if not moving { Prepare(); } } else { UnbindEvents(); } } }
protected CurvyCGEventArgs OnRefreshEvent(CurvyCGEventArgs e) { if (OnRefresh != null) { OnRefresh.Invoke(e); } return(e); }
protected virtual void OnRefreshPath(CurvyCGEventArgs e) { if (Volume == null || e.Module != Volume.Module) e.Module.OnRefresh.RemoveListener(OnRefreshPath); else { if (Active) { if (Application.isPlaying) { if (mKeepDistanceAt > 0 && IsInitialized && IsPlaying) { AbsolutePosition = mKeepDistanceAt; mKeepDistanceAt = 0; } if (Speed == 0) Refresh(); } else if (IsInitialized) // Align if not moving Prepare(); } else UnbindEvents(); } }
void onCGRefresh(CurvyCGEventArgs e) { FsmEventData _eventData = new FsmEventData(); this.FirePlayMakerEvent(CGOnRefresh, cgOnRefreshEventTarget, _eventData); }