Assumes you are in the PlayState.
Static variables
staticfinalread onlyonVideoEnded:FlxSignal = new FlxSignal()
Called when the video is ended or skipped.
staticfinalread onlyonVideoRestarted:FlxSignal = new FlxSignal()
Called if the video is restarted. onVideoStarted is not called.
Static methods
staticdestroyVideo():Void
Destroy the active cutscene, if any. Separate from finishVideo() so that it doesn't trigger onCutsceneFinish().
staticfinishVideo(transitionTime:Float = 0.5):Void
Finish the active video cutscene. Done when the video is finished or when the player skips the cutscene.
Parameters:
transitionTime | The duration of the transition to the next state. Defaults to 0.5 seconds (this time is always used when cancelling the video). |
|---|---|
finishCutscene | The callback to call when the transition is finished. |
staticplay(filePath:String, cutsceneType:CutsceneType = STARTING):Void
Play a video cutscene. TODO: Currently this is hardcoded to start the countdown after the video is done.
Parameters:
path | The path to the video file. Use Paths.file(path) to get the correct path. |
|---|---|
cutseneType | The type of cutscene to play, determines what the game does after. Defaults to |