mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 04:33:31 +00:00
Use the TextureManager
This commit is contained in:
parent
4df43d7bed
commit
085bfa0cac
1 changed files with 4 additions and 2 deletions
|
@ -401,13 +401,15 @@ var Tilemap = new Class({
|
|||
if (tilesetName === undefined) { return null; }
|
||||
if (key === undefined || key === null) { key = tilesetName; }
|
||||
|
||||
if (!this.scene.sys.textures.exists(key))
|
||||
var textureManager = this.scene.sys.textures;
|
||||
|
||||
if (!textureManager.exists(key))
|
||||
{
|
||||
console.warn('Texture key "%s" not found', key);
|
||||
return null;
|
||||
}
|
||||
|
||||
var texture = this.scene.sys.textures.get(key);
|
||||
var texture = textureManager.get(key);
|
||||
|
||||
var index = this.getTilesetIndex(tilesetName);
|
||||
|
||||
|
|
Loading…
Reference in a new issue