Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Touch_and_Move.h"
- Scene* TouchMove::createScene()
- {
- auto scene = Scene::create();
- auto layer = TouchMove::create();
- scene->addChild(layer);
- return scene;
- }
- bool TouchMove::init()
- {
- if(!Layer::init())
- {
- return false;
- }
- this-> ball = Sprite::create("ball-hd.png");
- this-> addChild(ball);
- this-> setPosition(TouchMove::screen().width/2, TouchMove::screen().height/2);
- auto jump = JumpTo::create(1.f, Point(0,0), 150, 4);
- ball->runAction(jump);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement