fixed bootstrapping and asset handling

This commit is contained in:
2025-04-11 23:47:07 +02:00
parent f4bbbb9454
commit d73b8bb02e
15 changed files with 1432 additions and 318 deletions
+8 -6
View File
@@ -1,20 +1,22 @@
package;
import openfl.utils.AssetType;
import openfl.display.Sprite;
import openfl.Assets;
import openfl.Lib;
import sys.FileSystem;
import Assets;
class Main extends Sprite {
public function new() {
super();
Lib.current.addChild(this);
// Draw background to verify app is running
graphics.beginFill(0x3498db, 1);
graphics.drawRect(0, 0, 800, 600);
graphics.endFill();
var testAsset = Assets.getText("assets/data/img/placeholder.txt");
trace(testAsset);
var testAsset = openfl.Assets.getText("img/placeholder.txt");
trace("Successfully loaded asset: " + testAsset);
}
}