class CC_DLL CCCallFunc : public CCActionInstant //<NSCopying>
void Issue1305_2::onEnter()
{
ActionsDemo::onEnter();
centerSprites(); CCSprite *spr = CCSprite::create("Images/grossini.png");
spr->setPosition(ccp(,));
addChild(spr); CCMoveBy* act1 = CCMoveBy::create( ,ccp(, ));
//CCCallFunc也是动作,可以放到动作序列里
CCCallFunc* act2 = CCCallFunc::create(this, callfunc_selector(Issue1305_2::log1)) ;
CCMoveBy* act3 = CCMoveBy::create(, ccp(, -));
CCCallFunc* act4 = CCCallFunc::create(this, callfunc_selector(Issue1305_2::log2)) ;
CCMoveBy* act5 = CCMoveBy::create(, ccp(, -));
CCCallFunc* act6 = CCCallFunc::create(this, callfunc_selector(Issue1305_2::log3)) ;
CCMoveBy* act7 = CCMoveBy::create(, ccp(-, ));
CCCallFunc* act8 = CCCallFunc::create(this, callfunc_selector(Issue1305_2::log4)) ; CCFiniteTimeAction* actF = CCSequence::create(act1, act2, act3, act4, act5, act6, act7, act8, NULL); // [spr runAction:actF];
CCDirector::sharedDirector()->getActionManager()->addAction(actF ,spr, false); } void Issue1305_2::log1()
{
CCLog("1st block");
} void Issue1305_2::log2()
{
CCLog("2nd block");
} void Issue1305_2::log3()
{
CCLog("3rd block");
} void Issue1305_2::log4()
{
CCLog("4th block");
}