I want to change a sprite image according to some dynamic variable in Cocos2d-x and C++, so I'm, trying something like this but there is an error. What could it be a right way to do it?. Greetings.
auto name = String::createWithFormat("x%i.png", _destroyedUnits);
auto combo = Sprite::createWithSpriteFrameName(name);
Aucun commentaire:
Enregistrer un commentaire