首页 > 代码库 > CCSequence::create(array);

CCSequence::create(array);

/所有的路径节点

CCArray *array = CCArray::createWithCapacity(20);

float dt=1/(m_pProperty->fMoveSpeed);

CCPoint point(-1,-1);

for (UINT i=0;i<CGlobal::getGameMap()->m_PathNode.size()-1;++i)

{

    array->addObject(CCMoveTo::create(dt,point));

}

//移动完毕的回调

array->addObject(CCCallFunc::create(this,callfunc_selector(CMonster::onArrive)));

 

CCSequence* pAct=CCSequence::create(array);


CCSequence::create(array);