some updates
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// this file is for modchart things, this is to declutter playstate.hx
|
||||
|
||||
// Lua
|
||||
import openfl.display3D.textures.VideoTexture;
|
||||
import flixel.graphics.FlxGraphic;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
#if windows
|
||||
@ -417,6 +418,33 @@ class ModchartState
|
||||
|
||||
|
||||
// hud/camera
|
||||
|
||||
Lua_helper.add_callback(lua,"initBackgroundVideo", function(videoName:String) {
|
||||
trace('playing assets/videos/' + videoName + '.webm');
|
||||
PlayState.instance.backgroundVideo("assets/videos/" + videoName + ".webm");
|
||||
});
|
||||
|
||||
Lua_helper.add_callback(lua,"pauseVideo", function() {
|
||||
if (!GlobalVideo.get().paused)
|
||||
GlobalVideo.get().pause();
|
||||
});
|
||||
|
||||
Lua_helper.add_callback(lua,"resumeVideo", function() {
|
||||
if (GlobalVideo.get().paused)
|
||||
GlobalVideo.get().pause();
|
||||
});
|
||||
|
||||
Lua_helper.add_callback(lua,"restartVideo", function() {
|
||||
GlobalVideo.get().restart();
|
||||
});
|
||||
|
||||
Lua_helper.add_callback(lua,"setVideoSpritePos", function(x:Int,y:Int) {
|
||||
PlayState.instance.videoSprite.setPosition(x,y);
|
||||
});
|
||||
|
||||
Lua_helper.add_callback(lua,"setVideoSpriteScale", function(scale:Float) {
|
||||
PlayState.instance.videoSprite.setGraphicSize(Std.int(PlayState.instance.videoSprite.width * scale));
|
||||
});
|
||||
|
||||
Lua_helper.add_callback(lua,"setHudAngle", function (x:Float) {
|
||||
PlayState.instance.camHUD.angle = x;
|
||||
|
Reference in New Issue
Block a user