Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include "Touch_and_Move.h"
  2.  
  3. Scene* TouchMove::createScene()
  4. {
  5.     auto scene = Scene::create();
  6.     auto layer = TouchMove::create();
  7.     scene->addChild(layer);
  8.     return scene;
  9. }
  10.  
  11. bool TouchMove::init()
  12. {
  13.     if(!Layer::init())
  14.     {
  15.         return false;
  16.     }
  17.     this-> ball = Sprite::create("ball-hd.png");
  18.     this-> addChild(ball);
  19.     this-> setPosition(TouchMove::screen().width/2, TouchMove::screen().height/2);
  20.  
  21.     auto jump = JumpTo::create(1.f, Point(0,0), 150, 4);
  22.     ball->runAction(jump);
  23.     return true;
  24. }