Files
LPTCManager2026/bin/flash/haxe/ManifestResources.hx
T
2025-11-14 16:13:39 +01:00

112 lines
1.6 KiB
Haxe

package;
import haxe.io.Bytes;
import haxe.io.Path;
import lime.utils.AssetBundle;
import lime.utils.AssetLibrary;
import lime.utils.AssetManifest;
import lime.utils.Assets;
#if sys
import sys.FileSystem;
#end
#if disable_preloader_assets
@:dox(hide) class ManifestResources {
public static var preloadLibraries:Array<Dynamic>;
public static var preloadLibraryNames:Array<String>;
public static var rootPath:String;
public static function init (config:Dynamic):Void {
preloadLibraries = new Array ();
preloadLibraryNames = new Array ();
}
}
#else
@:access(lime.utils.Assets)
@:keep @:dox(hide) class ManifestResources {
public static var preloadLibraries:Array<AssetLibrary>;
public static var preloadLibraryNames:Array<String>;
public static var rootPath:String;
public static function init (config:Dynamic):Void {
preloadLibraries = new Array ();
preloadLibraryNames = new Array ();
rootPath = null;
if (config != null && Reflect.hasField (config, "rootPath")) {
rootPath = Reflect.field (config, "rootPath");
if(!StringTools.endsWith (rootPath, "/")) {
rootPath += "/";
}
}
if (rootPath == null) {
#if (ios || tvos || webassembly)
rootPath = "assets/";
#elseif android
rootPath = "";
#elseif (console || sys)
rootPath = lime.system.System.applicationDirectory;
#else
rootPath = "./";
#end
}
#if (openfl && !flash && !display)
#end
var data, manifest, library, bundle;
}
}
#if !display
#if flash
#elseif (desktop || cpp)
#else
#end
#if (openfl && !flash)
#if html5
#else
#end
#end
#end
#end