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);
- // 지정된 위치로 객체를 이동시키는 액션.
- auto action = MoveTo::create(3.0, Point(450, 50));
- // 객체에 지정된 액션을 바로 실행한다.
- spr->runAction(action);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement