Hollywoo loading screen/allow threaded loading

This commit is contained in:
2023-03-09 07:48:33 -07:00
parent 4be7705ed3
commit 6c59ad9c20
2 changed files with 7 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
"dependencies": {
"kiss": "",
"kiss-flixel": "",
"flixel-addons": "",
"hollywoo": ""
},
"url": "https://github.com/NQNStudios/kisslang",

View File

@@ -102,13 +102,16 @@
(SpriteTools.writeOnSprite subtitle SUBTITLES_SIZE titleCard (object x (Percent 0.5) y (Pixels subtitleY)))
(+= subtitleY SUBTITLES_SIZE SUBTITLES_MARGIN))
(FlxG.state.add titleCard)
// Allow skipping
(startWaitForInput cc))
(cc))
(method :Void doLoading [:Void->Void _load :Continuation cc]
(let [loop (new flixel.addons.util.FlxAsyncLoop 1 ->:Void {(_load)(cc)})]
(haxe.Timer.delay ->:Void (loop.start) 1)
(FlxG.state.add loop)))
(method :Void hideTitleCard []
(FlxG.state.remove titleCard))
// TODO these could be customizable to the Actor, wrylies, etc.
(var DIALOG_BOX_COLOR FlxColor.BLACK)
(var DIALOG_COLOR FlxColor.WHITE)