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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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