public void Stop(bool bForce) { if (bForce) { if (this.tracks != null) { int count = this.tracks.Count; for (int i = 0; i < count; i++) { Track track = this.tracks[i]; if (track.execOnForceStopped || track.execOnActionCompleted) { track.Start(this); int num = this.deltaTime; this.deltaTime = this.length; track.Process(this.deltaTime); track.Stop(this); this.deltaTime = num; } else if (track.started) { track.Stop(this); } } } if (this.tempObjsAffectedByPlaySpeed != null) { this.tempObjsAffectedByPlaySpeed.Clear(); } if (this.onActionStop != null) { PoolObjHandle <Action> poolObjHandle = new PoolObjHandle <Action>(this); this.onActionStop(ref poolObjHandle); } if (this.tracks != null) { for (int j = 0; j < this.tracks.Count; j++) { Track track2 = this.tracks[j]; track2.Release(); } this.tracks.Clear(); } if (ActionManager.Instance != null) { ActionManager.Instance.RemoveAction(this); } } else if (!this.nextDestroy) { this.nextDestroy = true; ActionManager.Instance.DeferReleaseAction(this); } }
public override void Process(AGE.Action _action, Track _track) { Track track = _action.GetTrack(this.trackId); if (track != null) { track.Stop(_action); } }
public void Process(int _time) { if (this.tracks != null) { int count = this.tracks.Count; for (int i = 0; i < count; i++) { Track track = this.tracks[i]; if (track.waitForConditions == null) { if (track.started) { track.Process(_time); } } else { if (this.conditionChanged && !track.started && track.startCount == 0u && track.CheckConditions(this)) { track.Start(this); if (!this.loop) { int eventEndTime = track.GetEventEndTime(); if (this.length < eventEndTime) { this.length = eventEndTime; } } } if (track.started) { track.Process(track.curTime + this.deltaTime); if (track.curTime > track.GetEventEndTime()) { track.Stop(this); } } } } } this.conditionChanged = false; }