Recommended Posts


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?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.