remove asyncloop when done
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#3e556127ea91cd336fb0128dd4efe59f41613274" into kiss-flixel/0.0.0/github/3e556127ea91cd336fb0128dd4efe59f41613274
|
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#0e713b49457d2b9822e60461832fb134cdaffd17" into kiss-flixel/0.0.0/github/0e713b49457d2b9822e60461832fb134cdaffd17
|
||||||
-lib flixel
|
-lib flixel
|
||||||
-lib flixel-addons
|
-lib flixel-addons
|
||||||
-lib flixel-ui
|
-lib flixel-ui
|
||||||
@@ -6,5 +6,5 @@
|
|||||||
-lib kiss-tools
|
-lib kiss-tools
|
||||||
-lib lime
|
-lib lime
|
||||||
-lib openfl
|
-lib openfl
|
||||||
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/3e556127ea91cd336fb0128dd4efe59f41613274/src/
|
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/0e713b49457d2b9822e60461832fb134cdaffd17/src/
|
||||||
-D kiss-flixel=0.0.0
|
-D kiss-flixel=0.0.0
|
||||||
@@ -539,9 +539,10 @@
|
|||||||
(set isLoading true)
|
(set isLoading true)
|
||||||
(set FlxG.autoPause false)
|
(set FlxG.autoPause false)
|
||||||
(set FlxG.mouse.visible false)
|
(set FlxG.mouse.visible false)
|
||||||
|
(localVar &mut :flixel.addons.util.FlxAsyncLoop loop null)
|
||||||
(let [doneFuncs []
|
(let [doneFuncs []
|
||||||
bar (new FlxBar 0 0 LEFT_TO_RIGHT (iThird FlxG.width) SimpleWindow.textSize doneFuncs "length" 0 _load.length true)
|
bar (new FlxBar 0 0 LEFT_TO_RIGHT (iThird FlxG.width) SimpleWindow.textSize doneFuncs "length" 0 _load.length true)]
|
||||||
loop (new flixel.addons.util.FlxAsyncLoop (+ 1 _load.length)
|
(set loop (new flixel.addons.util.FlxAsyncLoop (+ 1 _load.length)
|
||||||
->:Void
|
->:Void
|
||||||
(ifLet [nextLoad (_load.shift)]
|
(ifLet [nextLoad (_load.shift)]
|
||||||
{
|
{
|
||||||
@@ -555,9 +556,10 @@
|
|||||||
(pause))
|
(pause))
|
||||||
(set FlxG.autoPause true)
|
(set FlxG.autoPause true)
|
||||||
(FlxG.state.remove bar true)
|
(FlxG.state.remove bar true)
|
||||||
|
(FlxG.state.remove loop true)
|
||||||
(print (/ (/ flash.system.System.totalMemory 1024) 1000) "Memory in use: ")
|
(print (/ (/ flash.system.System.totalMemory 1024) 1000) "Memory in use: ")
|
||||||
(cc)
|
(cc)
|
||||||
}) (if scavenged LOAD_CALLS_PER_FRAME_SCAVENGE LOAD_CALLS_PER_FRAME))]
|
}) (if scavenged LOAD_CALLS_PER_FRAME_SCAVENGE LOAD_CALLS_PER_FRAME)))
|
||||||
(haxe.Timer.delay ->:Void (loop.start) 1)
|
(haxe.Timer.delay ->:Void (loop.start) 1)
|
||||||
// (set bar.cameras [flxMovie.uiCamera])
|
// (set bar.cameras [flxMovie.uiCamera])
|
||||||
(bar.createColoredEmptyBar FlxColor.BLACK true FlxColor.WHITE)
|
(bar.createColoredEmptyBar FlxColor.BLACK true FlxColor.WHITE)
|
||||||
|
|||||||
Reference in New Issue
Block a user