I'm a beginner in the program.
There is something like the type of runAction that is introduced on this site. http://brbranch.jp/blog/201309/cocos2d-x/cocos2d-x_animation2/
I was introduced above in Sprite, a game I made myself. I'd like to add an animation called "Extend the Ripples". When I wrote the program on Cocos2d-x (Ver3.3), I couldn't see it working.
がCCRipple 3D などは seems to have been prepared in advance for Cocos2d-x. Do I have to prepare a header file separately? Is it necessary to do something special?Please let me know.
cocos2d-x
I am also studying programming.
This seemed to work up to the Cocos2d-x v2 series, but
From v3, the Ripple 3D action must be NodeGrid.
Below is the code that we have verified that it actually works.
//Create sprite
Sprite*fish=Sprite::create("orangeFish.png");
fish->setPosition (Vec2 (320,568));
// rippling animation creation
Ripple 3D* action = Ripple 3D::create (6, cocos2d::Size (150,150), Vec2 (640/2, 1136/2), 500, 7,100);
// NodeGrid creation
NodeGrid*nodeGrid=NodeGrid::create();
nodeGrid->addChild(fish);
nodeGrid->runAction(action);
This ->addChild(nodeGrid);
© 2024 OneMinuteCode. All rights reserved.