New answers tagged cocos2d-x
The question refers to cocos2d-x 3.0. CCSprite has been deprecated in favor of Sprite and the CCString in favor of std::string. Actually, most methods in recent versions, accept only std::string and the prefix CC has been deprecated from most classes. Therefore the following would be correct (and not deprecated): std::ostringstream oss; oss << ...
don't create a empty sprite node. when you do Sprite::create(), load the first frame as the parameter. That is used to init contentSize and bounding-box variable of the sprite. So, that might help.
Top 50 recent answers are included