The statement is clear. You must use NodeGrid if you want to use GridActions like Lens3D or Waves3D. If you want to use this action, create a NodeGride, add a sprite to them and run the action on NodeGrid.
auto bgimage = Sprite::create("top.png"); bgimage->setPosition(visibleSize / 2); // create a Lens3D action ActionInterval* lens = Lens3D::create(10, Size(32, 24), Vec2(100, 180), 150); // create a Waved3D action ActionInterval* waves = Waves3D::create(10, Size(15, 10), 18, 15); // create a sequence an repeat it forever auto nodeGrid = NodeGrid::create(); nodeGrid->addChild(bgimage); nodeGrid->runAction(RepeatForever::create(Sequence::create(waves, lens, NULL))); this->addChild(nodeGrid);
source share