Browse Source

Merge branch '4.0' into 4.1-beta

# Conflicts:
#	spine-ts/package-lock.json
Mario Zechner 3 năm trước cách đây
mục cha
commit
9ee399bd1c
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      spine-ts/spine-core/src/AssetManagerBase.ts

+ 3 - 2
spine-ts/spine-core/src/AssetManagerBase.ts

@@ -138,7 +138,8 @@ export class AssetManagerBase implements Disposable {
 
 	loadTextureAtlas (path: string,
 		success: (path: string, atlas: TextureAtlas) => void = null,
-		error: (path: string, message: string) => void = null
+		error: (path: string, message: string) => void = null,
+		fileAlias: {[keyword:string] : string} = null
 	) {
 		let index = path.lastIndexOf("/");
 		let parent = index >= 0 ? path.substring(0, index + 1) : "";
@@ -149,7 +150,7 @@ export class AssetManagerBase implements Disposable {
 				let atlas = new TextureAtlas(atlasText);
 				let toLoad = atlas.pages.length, abort = false;
 				for (let page of atlas.pages) {
-					this.loadTexture(parent + page.name,
+					this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name],
 						(imagePath: string, texture: Texture) => {
 							if (!abort) {
 								page.setTexture(texture);