/// <summary> /// Stop the cutscene. /// </summary> public void Stop() { GameController.ApplicationState.OnUpdate -= Update; // There are no active cutscenes _active = null; // Stop all actors foreach(Actor actor in _actors) {actor.Stop();} // TODO: Event manager with a cutscene stop to handle if (HasNextCutScene) { GameController.CutsceneManager.StartCutscene (_nextCutScene, true); } else { OnCSEnd (); // This may be removed eventually OnFinishedPlaying(); } }
/// <summary> /// Play this instance. /// </summary> public void Play() { GameController.ApplicationState.OnUpdate += Update; // Set this to the active cutscene _active = this; // Play the animation for each actor in the cut scene foreach(Actor actor in _actors) { if(actor != null) { actor.Play(_animationClip, _origin); } } _hasStartedPlaying = false; // Broadcast the start of this cutscene RaiseStartCSEvent (); }