void HelloWorld::callback1(){ CCSize s = CCDirector::sharedDirector()->getWinSize(); CCLabelTTF *label = CCLabelTTF::create("callback1", "", 16); label->setPosition(ccp(s.width / 4 * 1, s.height /2)); addChild(label);}void HelloWorld::callback2(cocos2d::CCNode *pSender){ CCSize s = CCDirector::sharedDirector()->getWinSize(); CCLabelTTF *label = CCLabelTTF::create("callback2", "", 16); label->setPosition(ccp(s.width / 4 * 2, s.height /2)); addChild(label);}void HelloWorld::callback3(cocos2d::CCNode *pTarget, void *data){ CCSize s = CCDirector::sharedDirector()->getWinSize(); CCLabelTTF *label = CCLabelTTF::create("callback3", "", 16); label->setPosition(ccp(s.width / 4 * 3, s.height /2)); addChild(label);}
待续Loading...