Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some lua improvements #15088

Open
wants to merge 25 commits into
base: experimental
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update LuaUtils.hx
  • Loading branch information
LarryFrosty committed Jul 12, 2024
commit 590d78b089e2fee8ff6cffbfb3c572f47a10d79b
6 changes: 5 additions & 1 deletion source/psychlua/LuaUtils.hx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class LuaUtils

public static function getLuaTween(options:Dynamic)
{
if (options == null) options = {}
return {
type: getTweenTypeByString(options.type),
startDelay: options.startDelay,
Expand Down Expand Up @@ -496,9 +497,12 @@ class LuaUtils

public static function cameraFromString(cam:String):FlxCamera {
switch(cam.toLowerCase()) {
case 'camgame' | 'game': return PlayState.instance.camGame;
case 'camhud' | 'hud': return PlayState.instance.camHUD;
case 'camother' | 'other': return PlayState.instance.camOther;
}
return PlayState.instance.camGame;
var camera:Dynamic = MusicBeatState.getVariables().get(cam);
if (camera == null || !Std.isOfType(camera, FlxCamera)) camera = PlayState.instance.camGame;
return camera;
}
}
Loading