CCActionInterval*  move1 = CCMoveBy::create(, ccp(,));
CCActionInterval* move2 = CCMoveBy::create(, ccp(,));
CCToggleVisibility* tog1 = new CCToggleVisibility();
CCToggleVisibility* tog2 = new CCToggleVisibility();
tog1->autorelease();
tog2->autorelease();
//目前的理解是夹在tog1和tog2间的move2将不显示中间的过渡动作,
//动作的时间到了之后精灵就直接显示在动作的结果位置
CCFiniteTimeAction* seq = CCSequence::create( move1, tog1, move2, tog2, move1->reverse(), NULL);
CCActionInterval* action = CCRepeat::create((CCActionInterval*)(CCSequence::create( seq, seq->reverse(), NULL)), );
void ActionRepeat::onEnter()
{
ActionsDemo::onEnter(); alignSpritesLeft(); CCActionInterval* a1 = CCMoveBy::create(, ccp(,));
CCActionInterval* action1 = CCRepeat::create(
//动作组:先在(60,60)位置显示,然后执行动作a1
//对该动作组重复执行3次
CCSequence::create( CCPlace::create(ccp(,)), a1, NULL) ,
);
CCAction* action2 = CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create((CCActionInterval*)(a1->copy()->autorelease()), a1->reverse(), NULL))
); m_kathia->runAction(action1);
m_tamara->runAction(action2);
}
05-11 22:06