Make sure lime.Assets when onPreloaderComplete is called

This commit is contained in:
Joshua Granick
2016-11-01 07:39:50 -07:00
parent b5fc26444b
commit 87f331ca3c

View File

@@ -63,6 +63,7 @@ class ApplicationMain {
public static function create ():Void { public static function create ():Void {
preloader = new ::if (PRELOADER_NAME != "")::::PRELOADER_NAME::::else::lime.app.Preloader::end:: (); preloader = new ::if (PRELOADER_NAME != "")::::PRELOADER_NAME::::else::lime.app.Preloader::end:: ();
preloader.onComplete.add (registerLibrary);
#if !munit #if !munit
app = new ::APP_MAIN:: (); app = new ::APP_MAIN:: ();
@@ -170,10 +171,15 @@ class ApplicationMain {
#end #end
public static function start ():Void { private static function registerLibrary ():Void {
lime.Assets.registerLibrary ("default", new DefaultAssetLibrary ()); lime.Assets.registerLibrary ("default", new DefaultAssetLibrary ());
}
public static function start ():Void {
#if !munit #if !munit
var result = app.exec (); var result = app.exec ();