Skip to content

Instantly share code, notes, and snippets.

@pineoc
Created January 1, 2016 10:03
Show Gist options
  • Save pineoc/f3ccf5513a25430a8371 to your computer and use it in GitHub Desktop.
Save pineoc/f3ccf5513a25430a8371 to your computer and use it in GitHub Desktop.
bool HelloWorld::init()
{
/*has some code*/
//sprite
auto sprite = Sprite::create("CloseNormal.png");
this->addChild(sprite1);
//sprite change, setTexture
sprite->setTexture(Director::getInstance()->getTextureCache()->addImage("CloseNormal_changed.png"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment