Cutscene
This script implements the CutsceneCmdInterface. Every Cutscene Command requires this type of script to be attached as well.
Contents |
Events
It exposes events to handle most of the functions from the interface, each of which have this function signature: public delegate void CutsceneNotification ()
public event CutsceneNotification OnCutsceneStart
This is called when the cutscene is starting.
public event CutsceneNotification OnCutsceneReset
This is called when the cutscene is resetting.
public event CutsceneNotification OnCutsceneUpdate
This is called every frame that the cutscene is active to update the cutscene.
public event CutsceneNotification OnCutsceneFinished
This is called when the cutscene is finished.
Flags
This class also keeps an internal “isComplete” flag, and exposes a setter function that can be used by the cutscene commands to notify the cutscene when they have completed. public void SetComplete (bool _complete)
Custom Editor
The Cutscene class also has functions for getting the CompoundCutscene list to which the cutscene belongs to. This is for easily manipulating the cutscene in the editor. In the editor, the Cutscene will display “registered” if it’s in the list of the CompoundCutscene directly above the Cutscene in the Hierarchy window. If it’s not in the list, it will display “unregistered”. There is a button to change whether the Cutscene is registered or not. If unregistered and re-registered, the cutscene will be placed at the bottom of the list of Cutscenes in the CompoundCutscene.
cutsceneName : string
This is the name of the cutscene clip. Changing this will also set the name of the game object the cutscene is attached to.