weratius Posted March 24, 2016 Share Posted March 24, 2016 Hello, guys! In the boot.js file I load a 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() { //smth }); loader.start(); But the key doesn't rewrite How can I solve such a problem? Thank you =) Link to comment Share on other sites More sharing options...
fillmoreb Posted March 25, 2016 Share Posted March 25, 2016 I would try using cache.removeTextureAtlas("MyShip"); right before you try loading the new file. Might work. Link to comment Share on other sites More sharing options...
Obliviadge Posted March 25, 2016 Share Posted March 25, 2016 Why do you need to load it with the same id? Link to comment Share on other sites More sharing options...
Recommended Posts