Jump to content

I changed the name of my sprite.png and its not showing up in game anymore.


kriket
 Share

Recommended Posts

Had this problem since yesterday. So, I have a sprite thats loaded in preload, then grouped

 

//    this.load.image('goldCoin', 'assets/images/goldCoin35.png');
      this.goldPool = this.add.group();      this.goldPool.enableBody = true;      this.goldPool.physicsBodyType = Phaser.Physics.ARCADE;            this.goldPool.createMultiple(5, 'chest');      this.nextGoldAt = 0;      this.goldDelay = 1000;

The problem is everytime I change something, like the name of sprite in folder and then in preload (to say goldCoing.png instead of goldCoin35.png), or change say a property like delay from 1 second delay to 2 second delay, that sprite group just doesnt show up in my game at all. 

Link to comment
Share on other sites

Sounds like it could be a problem with the browser cache? In Chrome, you can disable its cache while DevTools are open (F12, then click the gear icon in the top right for options)

 

I did that to no avail. I am also using brackets' live server which i think starts its own instance of chromium.

Cleared cookies. still same issue

If thats any help. 

Link to comment
Share on other sites

**solved**

 

The group was set to OutOfBoundsKill = true, and the sprite being loaded was spawning so close to the edge that a few pixel here and there by changing a property slightly (or by tweaking the sprite in photoshop) and it was getting killed at spawn, as the anchor was set to (0.5,0.5).

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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