Jump to content

LoadTexture


MaxAg
 Share

Recommended Posts

Hi,

I'm trying to change texture of a sprite but it's not working....

player = this.physics.add.sprite(200, 100, 'dude');

player.loadTexture('dudeGun', 0, false);

but i have this error message

player.loadTexture is not a function

Apparently this method is only for this.add.sprite, not for physics... do we have any equivalent method when we use physics?

Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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