video cutscenes define
This commit is contained in:
@@ -190,4 +190,7 @@
|
||||
|
||||
<!-- Comment this out to use the default OpenFL assets system for the assets/ folder. !-->
|
||||
<haxedef name="USE_ADAPTED_ASSETS" />
|
||||
|
||||
<!-- Comment this out to disable video cutscene support, in case of compilation errors. !-->
|
||||
<haxedef name="VIDEO_CUTSCENES" unless="web" />
|
||||
</project>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package funkin.cutscenes;
|
||||
|
||||
#if sys
|
||||
#if VIDEO_CUTSCENES
|
||||
import vlc.bitmap.VlcBitmap;
|
||||
import flixel.util.FlxTimer;
|
||||
import funkin.options.PlayerSettings;
|
||||
|
||||
@@ -9,7 +9,7 @@ class VideoCutscene extends Cutscene {
|
||||
var path:String;
|
||||
var localPath:String;
|
||||
|
||||
#if sys
|
||||
#if VIDEO_CUTSCENES
|
||||
var video:MP4Handler;
|
||||
var videoSprite:FlxSprite;
|
||||
#end
|
||||
@@ -27,7 +27,7 @@ class VideoCutscene extends Cutscene {
|
||||
cutsceneCamera.bgColor = 0;
|
||||
FlxG.cameras.add(cutsceneCamera, false);
|
||||
|
||||
#if sys
|
||||
#if VIDEO_CUTSCENES
|
||||
video = new MP4Handler();
|
||||
video.finishCallback = close;
|
||||
video.canvasWidth = cutsceneCamera.width;
|
||||
@@ -46,12 +46,12 @@ class VideoCutscene extends Cutscene {
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
super.update(elapsed);
|
||||
#if !sys
|
||||
#if !VIDEO_CUTSCENES
|
||||
close();
|
||||
#end
|
||||
}
|
||||
public override function destroy() {
|
||||
FlxG.cameras.remove(camera, true);
|
||||
FlxG.cameras.remove(cutsceneCamera, true);
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user