HTML5: Several fixes to asset loading (#136)

* Update Polymod to fix async script loading.

* Got into the Main Menu but playstate doesn't work

* Got into PlayState but GF script breaks!

---------

Co-authored-by: Cameron Taylor <cameron.taylor.ninja@gmail.com>
This commit is contained in:
Eric 2023-09-04 22:18:45 -04:00 committed by GitHub
parent d4e601ebaa
commit bb09cc19e7
3 changed files with 19 additions and 13 deletions

View File

@ -23,8 +23,10 @@
},
{
"name": "flixel-ui",
"type": "haxelib",
"version": "2.5.0"
"type": "git",
"dir": null,
"ref": "719b4f10d94186ed55f6fef1b6618d32abec8c15",
"url": "https://github.com/HaxeFlixel/flixel-ui"
},
{
"name": "flxanimate",
@ -57,6 +59,13 @@
"ref": "be0b18553189a55fd42821026618a18615b070e3",
"url": "https://github.com/haxeui/haxeui-flixel"
},
{
"name": "hmm",
"type": "git",
"dir": null,
"ref": "d514d7786cabf18b90e60fcee38399fd44c2ddfb",
"url": "https://github.com/andywhite37/hmm"
},
{
"name": "hscript",
"type": "haxelib",
@ -93,7 +102,7 @@
"name": "lime",
"type": "git",
"dir": null,
"ref": "558798adc5bf0e82d70fef589a59ce88892e0b5b",
"ref": "f195121ebec688b417e38ab115185c8d93c349d3",
"url": "https://github.com/EliteMasterEric/lime"
},
{
@ -128,14 +137,14 @@
"name": "openfl",
"type": "git",
"dir": null,
"ref": "1591a6c5f1f72e65d711f7e17e8055df41424d94",
"ref": "ef43deb2c68d8a4bcd73abfbd77324fc8220d0c1",
"url": "https://github.com/EliteMasterEric/openfl"
},
{
"name": "polymod",
"type": "git",
"dir": null,
"ref": "4bcd614103469af79a320898b823d1df8a55c3de",
"ref": "e8a07b81e3bc535238ad8649e38f5d43c46f1b65",
"url": "https://github.com/larsiusprime/polymod"
},
{
@ -147,13 +156,6 @@
"name": "tink_json",
"type": "haxelib",
"version": "0.11.0"
},
{
"name": "hmm",
"type": "git",
"dir": null,
"ref": "d514d7786cabf18b90e60fcee38399fd44c2ddfb",
"url": "https://github.com/andywhite37/hmm"
}
]
}

View File

@ -1,5 +1,6 @@
package funkin;
import flixel.FlxState;
import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
import flixel.addons.transition.TransitionData;
@ -33,8 +34,10 @@ import Discord.DiscordClient;
* The initialization state has several functions:
* - Calls code to set up the game, including loading saves and parsing game data.
* - Chooses whether to start via debug or via launching normally.
*
* It should not contain any sprites or rendering.
*/
class InitState extends FlxTransitionableState
class InitState extends FlxState
{
/**
* Perform a bunch of game setup, then immediately transition to the title screen.

View File

@ -114,6 +114,7 @@ class PolymodHandler
// Parse hxc files and register the scripted classes in them.
useScriptedClasses: true,
loadScriptsAsync: #if html5 true #else false #end,
});
if (loadedModList == null)