2015-08-28 14:54:12 +08:00
|
|
|
#ifndef _APP_DELEGATE_H_
|
|
|
|
#define _APP_DELEGATE_H_
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The cocos2d Application.
|
|
|
|
|
2016-05-25 22:25:38 +08:00
|
|
|
Private inheritance here hides part of interface from Director.
|
2015-08-28 14:54:12 +08:00
|
|
|
*/
|
|
|
|
class AppDelegate : private cocos2d::Application
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AppDelegate();
|
|
|
|
virtual ~AppDelegate();
|
|
|
|
|
|
|
|
virtual void initGLContextAttrs();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Implement Director and Scene init code here.
|
|
|
|
@return true Initialize success, app continue.
|
|
|
|
@return false Initialize failed, app terminate.
|
|
|
|
*/
|
|
|
|
virtual bool applicationDidFinishLaunching();
|
|
|
|
|
|
|
|
/**
|
2016-05-25 22:25:38 +08:00
|
|
|
@brief Called when the application moves to the background
|
2015-08-28 14:54:12 +08:00
|
|
|
@param the pointer of the application
|
|
|
|
*/
|
|
|
|
virtual void applicationDidEnterBackground();
|
|
|
|
|
|
|
|
/**
|
2016-05-25 22:25:38 +08:00
|
|
|
@brief Called when the application reenters the foreground
|
2015-08-28 14:54:12 +08:00
|
|
|
@param the pointer of the application
|
|
|
|
*/
|
|
|
|
virtual void applicationWillEnterForeground();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _APP_DELEGATE_H_
|
|
|
|
|