Advertisement
Guest User

HelloWorldScene.h

a guest
Dec 26th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #ifndef __HELLOWORLD_SCENE_H__
  2. #define __HELLOWORLD_SCENE_H__
  3.  
  4. #include "cocos2d.h"
  5.  
  6.  
  7. class HelloWorld : public cocos2d::CCLayer
  8. {
  9. public:
  10.     // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
  11.     virtual bool init();  
  12.  
  13.     // there's no 'id' in cpp, so we recommend returning the class instance pointer
  14.     static cocos2d::CCScene* scene();
  15.  
  16.     // a selector callback
  17.     void menuCloseCallback(CCObject* pSender);
  18.  
  19.     void CCTouchesBegan(cocos2d::CCSet *pTouches, cocos2d::CCEvent *pEvent);
  20.  
  21.     // implement the "static node()" method manually
  22.     CREATE_FUNC(HelloWorld);
  23.  
  24.  
  25. };
  26.  
  27. #endif // __HELLOWORLD_SCENE_H__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement