0

guys!

In the boot.js file I load an atlastexture

game.load.atlasJSONHash('MyShip', urlForImages + 'img/animatedObjects/ships/' + playerInfoObject.ship.id + '.png', urlForJSONS + 'img/animatedObjects/ships/' + playerInfoObject.ship.id + '.json');

Then I need to load another image with this key and I do this:

var loader = new Phaser.Loader(game);

loader.atlasJSONHash('MyShip', configObj.urlForImages + 'img/animatedObjects/ships/' + playerInfoObject.ship.id + '.png', configObj.urlForJSONS + 'img/animatedObjects/ships/' + playerInfoObject.ship.id + '.json');

loader.onLoadComplete.add(function() {
    console.log('done')
});

loader.start();

But this doesn't rewrite image...

How can I solve such a problem?

Thank you =)

weratius
  • 113
  • 1
  • 12

1 Answers1

0

try to remove the Cached Assets game.cache.removeTextureAtlas before rewrite it

Sky Walker
  • 978
  • 1
  • 9
  • 22