一个精灵能不能在播放帧动画的同时执行其他动作,比如MoveTo
如果之前已经从帧缓存中创建了一个精灵,那么有一个组合动作
auto planeMoveTo = MoveTo::create(flyTime,Vec2(planePosition.x,winSize.height + planeSize.height/2));
auto planeMoveDone = CallFuncN::create(CC_CALLBACK_1(BulletLayer::removeBullet,this));
auto planeSequence = Sequence::create(planeMoveTo,planeMoveDone,NULL);
// .....................
auto animation = Animation::create();
animation->setDelayPerUnit(1.0 / 60);
char buff = {0};
for (int i = 1 ; 1 <= 2 ; i++)
{
printf(buff,"bullet_%d.png",i);
animation->addSpriteFrame(SpriteFrameCache::getInstance()->getSpriteFrameByName(buff));
}
auto animate = Animate::create(animation);
```
能不能在和动画用Spawn() 组合?