【发布时间】:2020-07-12 09:01:46
【问题描述】:
我使用下面的代码为背景图像制作水状动画
auto background = Sprite::create(TEX_MM_BG);
background->setPosition(Vec2(SW*0.5f, SH*0.5f));
auto nodeGrid = NodeGrid::create();
nodeGrid->addChild(background);
this->addChild(nodeGrid, 0);
ActionInterval* lens = Lens3D::create(10, Size(32, 24), Vec2(100, 180), 150);
ActionInterval* waves = Waves3D::create(10, Size(15, 10), 18, 15);
nodeGrid->runAction(RepeatForever::create(Sequence::create(waves,lens, NULL)));
动画效果不错。但它停止 10 秒然后播放 10 秒然后再次停止 10 秒......它重复。如何避免中途停顿?
【问题讨论】:
标签: c++ ios iphone xcode cocos2d-x