반응형 시쁠쁠1 cocos2d-x sprintf이용해서 점수 표시 ●sprintf- 메모리에 출력한다.- sprintf(문자배열명, "출력문자와 자료형(ex.%d)", 입력 데이터); ●예제- HelloWorldScene.cpp #include "HelloWorldScene.h" using namespace cocos2d; CCScene* HelloWorld::scene(){ CCScene *scene = CCScene::create(); HelloWorld *layer = HelloWorld::create(); scene->addChild(layer); return scene;} bool HelloWorld::init(){ if ( !CCLayerColor::initWithColor(ccc4(255, 255, 255, 255)) ) { return false; }//.. 2013. 6. 9. 이전 1 다음 반응형