Jump to content

How to rewrite path of the loaded atlasJSONHash?


Recommended Posts

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() {


But the key doesn't rewrite

How can I solve such a problem?

Thank you =)

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...