walterdev

Cocos2d-x sample scene

Feb 5th, 2015
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. //
  2. //  KeyboardScene.h
  3. //  AtomicCat
  4. //
  5.  
  6. #ifndef __KEYBOARD_SCENE_H__
  7. #define __KEYBOARD_SCENE_H__
  8.  
  9. #include "cocos2d.h"
  10. #include <map>
  11.  
  12. #include "cocos2d.h"
  13.  
  14. class KeyboardScene : public cocos2d::Layer
  15. {
  16. public:
  17.     // there's no 'id' in cpp, so we recommend returning the class instance pointer
  18.     static cocos2d::Scene* createScene();
  19.    
  20.     // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
  21.     virtual bool init();
  22.    
  23.     // implement the "static create()" method manually
  24.     CREATE_FUNC(KeyboardScene);
  25. };
  26.  
  27. #endif
  28.  
  29. //
  30. //  KeyboardScene.h
  31. //  
  32.  
  33. #ifndef __KEYBOARD_SCENE_H__
  34. #define __KEYBOARD_SCENE_H__
  35.  
  36. #include "cocos2d.h"
  37. #include <map>
  38.  
  39. #include "cocos2d.h"
  40.  
  41. class KeyboardScene : public cocos2d::Layer
  42. {
  43. public:
  44.     // there's no 'id' in cpp, so we recommend returning the class instance pointer
  45.     static cocos2d::Scene* createScene();
  46.    
  47.     // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
  48.     virtual bool init();
  49.    
  50.     // implement the "static create()" method manually
  51.     CREATE_FUNC(KeyboardScene);
  52. };
  53.  
  54. #endif
Add Comment
Please, Sign In to add comment