public void Kill() { // Kills the Set and all of its tweens witout running any of the end actions. // It also does not attemtp to put all tweens to thier final targets. mEndActions.Clear(); mActive = false; foreach (RedTween.Track track in mTracks.Values) { track.Kill(); } RedTween.EndSet(this); RedTweenVisualizer.RemoveVizualization(mVisualizer); }
private void End() { mActive = false; RedTween.EndSet(this); for (int i = 0; i < mEndActions.Count; i++) { if (mEndActions[i] != null) { mEndActions[i](); } } mEndActions.Clear(); RedTweenVisualizer.RemoveVizualization(mVisualizer); }
public void ForceEnd() { mActive = false; foreach (RedTween.Track track in mTracks.Values) { track.Kill(); } RedTween.EndSet(this); for (int i = 0; i < mEndActions.Count; i++) { if (mEndActions[i] != null) { mEndActions[i](); } } mEndActions.Clear(); RedTweenVisualizer.RemoveVizualization(mVisualizer); }
public void Play() { //Debug.Log("Starting Tween Set " + Tag + " - " + Time.time); if (mActive) { // Comp is already Active. Debug.LogWarning("This Tween Comp is already Active and cannot be played again."); return; } if (mTracks.Count == 0) { // You cannot play a comp that has no sequences Debug.LogWarning("You cannot play this Comp because it does not contain any tracks."); return; } // Run any start actions that have been assigned. for (int i = 0; i < mStartActions.Count; i++) { if (mStartActions[i] != null) { mStartActions[i](); } } mStartActions.Clear(); // Start the Set. RedTween.PlaySet(this); mActive = true; // Start Playing All Tracks. foreach (Track track in mTracks.Values) { track.StartInternal(); } }