Jump to content

Remove Texture from Sprite


charlie_says
 Share

Recommended Posts

Hi,

I've got a setup where I create an empty sprite, and then later add a texture.

this.path = game.make.sprite(0,0);

this.addChild(this.path);

//... later

this.path.loadTexture('frame');

This all works fine, but, I would now like to 'unload' the texture, return the sprite to it's initial empty state.

One way I could do it, is to have a blank texture, which I could load in - but, I wondered if there was a way to unload??

Thanks!
 

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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