mercredi 28 mai 2014

how can i use number sprite to display score in cocos2d-x using c++?


Vote count:

0




i have number in sprite (eg-1.png,1.png etc..) i would like to use these number to display score as well as high score in cocos2d-x using c++ in xcode. i really appreciate if someone can help me with source code.. thanks for it in advance..


cocos2d::LabelBMFont* label = cocos2d::LabelBMFont::create(std::to_string(score), "Marker Felt"); label->setAlignment(cocos2d::TextHAlignment::CENTER);


addChild(label, 0);


label->setPosition(...); i can display using Label.. but dont know how to use number images to display score. :(



asked 57 secs ago






Aucun commentaire:

Enregistrer un commentaire