Cocos2dx:Sprite切换图片

2019-04-15 17:46发布

Cocos2dx:Sprite切换图片
更换背景图:
auto background1 = Sprite::create("original.png"); Texture2D * pic = Director::getInstance()->getTextureCache()->addImage("now.png"); background->setTexture(pic);