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