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-> background = Sprite::create("BG-HD.png");
  18.     this-> background-> setPosition(TouchMove::screen().width/2, TouchMove::screen().height/2);
  19.     this-> addChild(background, -1);
  20.  
  21.     this-> cloud = Sprite::create("cloud-HD.png");
  22.     this->cloud->setPosition(100, 600);
  23.     this-> addChild(cloud, 10);
  24.  
  25.     return true;
  26. }