Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool HelloWorld::init()
- {
- if (!Layer::init())
- {
- return false;
- }
- auto spr = Sprite::create("ball.png");
- spr->setPosition(Point(50, 50));
- this->addChild(spr);
- // 5.0초 동안, (300, 0) 상대적 거리로, 150높이, 5번 점프.
- auto action = JumpBy::create(5.0, Point(300, 0), 150, 5);
- // 객체에 지정된 액션을 바로 실행한다.
- spr->runAction(action);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement