-
Notifications
You must be signed in to change notification settings - Fork 3
Asset Manager
baris edited this page Jan 4, 2022
·
8 revisions
var animateAtlasAssetManager:AnimateAtlasAssetManager<AnimateAtlasSheet> = new AnimateAtlasAssetManager<AnimateAtlasSheet>(AnimateAtlasSheet);
var animateAtlasSheet:AnimateAtlasSheet = animateAtlasAssetManager.loadAssetSync("assets/ninja-girl");
var future:Future<AnimateAtlasSheet> = animateAtlasAssetManager.loadAsset("assets/ninja-girl");
future.onComplete(function(animateAtlasSheet:AnimateAtlasSheet) {
}).onError(function(msg) {
});
var animateAtlasSheet:AnimateAtlasSheet = animateAtlasAssetManager.loadCompressedAssetSync("assets/ninja-girl.zip");
var future:Future<AnimateAtlasSheet> = animateAtlasAssetManager.loadCompressedAsset("assets/ninja-girl.zip");
future.onComplete(function(animateAtlasSheet:AnimateAtlasSheet) {
}).onError(function(msg) {
});
var future:Future<AnimateAtlasSheet> = animateAtlasAssetManager.requestCompressedAsset("http://example.com/assets/ninja-girl.zip");
future.onComplete(function(animateAtlasSheet:AnimateAtlasSheet) {
}).onError(function(msg) {
});
Warning: Because of the bom encoding in Haxe json files, it may give the error "Unexpected token in JSON at position 0", please remove the bom encoding.