AppDelegate.h 942 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _APP_DELEGATE_H_
  2. #define _APP_DELEGATE_H_
  3. #include "cocos2d.h"
  4. /**
  5. @brief The cocos2d Application..
  6. Private inheritance here hides part of interface from Director.
  7. */
  8. class AppDelegate : private cocos2d::Application
  9. {
  10. public:
  11. AppDelegate();
  12. virtual ~AppDelegate();
  13. virtual void initGLContextAttrs();
  14. /**
  15. @brief Implement Director and Scene init code here.
  16. @return true Initialize success, app continue.
  17. @return false Initialize failed, app terminate.
  18. */
  19. virtual bool applicationDidFinishLaunching();
  20. /**
  21. @brief Called when the application moves to the background
  22. @param the pointer of the application
  23. */
  24. virtual void applicationDidEnterBackground();
  25. /**
  26. @brief Called when the application reenters the foreground
  27. @param the pointer of the application
  28. */
  29. virtual void applicationWillEnterForeground();
  30. };
  31. #endif // _APP_DELEGATE_H_