fix: freeze when restarting a video cutscene.
This commit is contained in:
@@ -150,6 +150,7 @@ class VideoCutscene
|
||||
{
|
||||
vid.zIndex = 0;
|
||||
vid.active = false;
|
||||
vid.bitmap.onEncounteredError.add((_) -> finishVideo(0.5));
|
||||
vid.bitmap.onEndReached.add(finishVideo.bind(0.5));
|
||||
|
||||
vid.cameras = [PlayState.instance.camCutscene];
|
||||
|
||||
@@ -90,6 +90,7 @@ class IntroSubState extends MusicBeatSubState
|
||||
{
|
||||
vid.zIndex = 0;
|
||||
vid.active = false;
|
||||
vid.bitmap.onEncounteredError.add((_) -> onLightsEnd());
|
||||
vid.bitmap.onEndReached.add(onLightsEnd);
|
||||
vid.bitmap.onFormatSetup.add(() -> {
|
||||
vid.setGraphicSize(FlxG.initialWidth, FlxG.initialHeight);
|
||||
|
||||
@@ -97,6 +97,7 @@ class AttractState extends MusicBeatState
|
||||
{
|
||||
vid.zIndex = 0;
|
||||
vid.active = false;
|
||||
vid.bitmap.onEncounteredError.add((_) -> onAttractEnd());
|
||||
vid.bitmap.onEndReached.add(onAttractEnd);
|
||||
vid.bitmap.onFormatSetup.add(() -> {
|
||||
vid.setGraphicSize(FlxG.initialWidth, FlxG.initialHeight);
|
||||
|
||||
Reference in New Issue
Block a user