2012-04-19 14:35:52 +08:00
|
|
|
#ifndef _APP_DELEGATE_H_
|
|
|
|
#define _APP_DELEGATE_H_
|
|
|
|
|
2012-06-19 13:50:11 +08:00
|
|
|
#include "cocos2d.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The cocos2d Application.
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
The reason for implement as private inheritance is to hide some interface call by Director.
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
2013-06-20 14:17:10 +08:00
|
|
|
class AppDelegate : private cocos2d::Application
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
AppDelegate();
|
|
|
|
virtual ~AppDelegate();
|
|
|
|
|
|
|
|
/**
|
2013-06-20 14:17:10 +08:00
|
|
|
@brief Implement Director and Scene init code here.
|
2012-04-19 14:35:52 +08:00
|
|
|
@return true Initialize success, app continue.
|
|
|
|
@return false Initialize failed, app terminate.
|
|
|
|
*/
|
|
|
|
virtual bool applicationDidFinishLaunching();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The function be called when the application enter background
|
|
|
|
@param the pointer of the application
|
|
|
|
*/
|
|
|
|
virtual void applicationDidEnterBackground();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The function be called when the application enter foreground
|
|
|
|
@param the pointer of the application
|
|
|
|
*/
|
|
|
|
virtual void applicationWillEnterForeground();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _APP_DELEGATE_H_
|
|
|
|
|