void HelloWorld::menuCloseCallback(CCObject* pSender)
{
CCMoveBy* moveBy = CCMoveBy::create(2, ccp(240, 160));
CCRotateBy* rotateBy = CCRotateBy::create(2, 360*2);
CCJumpBy* jumpBy = CCJumpBy::create(2, ccp(100, 200), 40, 4);
CCLabelTTF* label = CCLabelTTF::create("HelloWorld", "zapfino", 24);
addChild(label);
label->setPosition(ccp(240, 280));
CCCallFuncO* callFuncO = CCCallFuncO::create(this, callfuncO_selector(HelloWorld::labelShow), label);
CCFiniteTimeAction* seq = CCSequence::create(moveBy,rotateBy,spawn,callFuncO,NULL);-------------
CCNode* node = this->getChildByTag(0);
node->runAction(seq);
}
void HelloWorld::labelShow(cocos2d::CCObject *sender)
{
CCLabelTTF* label = (CCLabelTTF*)sender;
label->setColor(ccRED);
}
{
CCMoveBy* moveBy = CCMoveBy::create(2, ccp(240, 160));
CCRotateBy* rotateBy = CCRotateBy::create(2, 360*2);
CCJumpBy* jumpBy = CCJumpBy::create(2, ccp(100, 200), 40, 4);
CCRotateBy* rotateBy_ = CCRotateBy::create(2, 360*3);
CCLabelTTF* label = CCLabelTTF::create("HelloWorld", "zapfino", 24);
addChild(label);
label->setPosition(ccp(240, 280));
CCCallFuncO* callFuncO = CCCallFuncO::create(this, callfuncO_selector(HelloWorld::labelShow), label);
CCFiniteTimeAction* seq = CCSequence::create(moveBy,rotateBy,spawn,callFuncO,NULL);-------------
CCNode* node = this->getChildByTag(0);
node->runAction(seq);
}
void HelloWorld::labelShow(cocos2d::CCObject *sender)
{
CCLabelTTF* label = (CCLabelTTF*)sender;
label->setColor(ccRED);
}