z
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1324
|
||||
1325
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.cutscenes;
|
||||
|
||||
#if sys
|
||||
import vlc.bitmap.VlcBitmap;
|
||||
import flixel.util.FlxTimer;
|
||||
import funkin.options.PlayerSettings;
|
||||
@@ -172,4 +173,5 @@ class MP4Handler
|
||||
if (FlxG.sound.volume <= 0.1 || FlxG.sound.muted)
|
||||
bitmap.volume = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#end
|
||||
@@ -9,8 +9,10 @@ class VideoCutscene extends Cutscene {
|
||||
var path:String;
|
||||
var localPath:String;
|
||||
|
||||
#if sys
|
||||
var video:MP4Handler;
|
||||
var videoSprite:FlxSprite;
|
||||
#end
|
||||
var cutsceneCamera:FlxCamera;
|
||||
|
||||
public function new(path:String, callback:Void->Void) {
|
||||
@@ -25,6 +27,7 @@ class VideoCutscene extends Cutscene {
|
||||
cutsceneCamera.bgColor = 0;
|
||||
FlxG.cameras.add(cutsceneCamera, false);
|
||||
|
||||
#if sys
|
||||
video = new MP4Handler();
|
||||
video.finishCallback = close;
|
||||
video.canvasWidth = cutsceneCamera.width;
|
||||
@@ -36,12 +39,16 @@ class VideoCutscene extends Cutscene {
|
||||
add(videoSprite);
|
||||
|
||||
video.playMP4(localPath, false, videoSprite);
|
||||
#end
|
||||
|
||||
cameras = [cutsceneCamera];
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
super.update(elapsed);
|
||||
#if !sys
|
||||
close();
|
||||
#end
|
||||
}
|
||||
public override function destroy() {
|
||||
FlxG.cameras.remove(camera, true);
|
||||
|
||||
Reference in New Issue
Block a user