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

 Share

  • Recently Browsing   0 members

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