2012-04-19 14:35:52 +08:00
|
|
|
//
|
|
|
|
// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h
|
|
|
|
// ___PROJECTNAME___
|
|
|
|
//
|
|
|
|
// Created by ___FULLUSERNAME___ on ___DATE___.
|
|
|
|
// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _APP_DELEGATE_H_
|
|
|
|
#define _APP_DELEGATE_H_
|
|
|
|
|
|
|
|
#include "CCApplication.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The cocos2d Application.
|
|
|
|
|
2012-09-15 06:26:38 +08:00
|
|
|
The reason to implement with private inheritance is to hide some interface details of CCDirector.
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
|
|
|
class AppDelegate : private cocos2d::CCApplication
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AppDelegate();
|
|
|
|
virtual ~AppDelegate();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Implement CCDirector and CCScene init code here.
|
|
|
|
@return true Initialize success, app continue.
|
|
|
|
@return false Initialize failed, app terminate.
|
|
|
|
*/
|
|
|
|
virtual bool applicationDidFinishLaunching();
|
|
|
|
|
|
|
|
/**
|
2012-09-15 06:26:38 +08:00
|
|
|
@brief The function is called when the application enters the background
|
|
|
|
@param the pointer of the application instance
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
|
|
|
virtual void applicationDidEnterBackground();
|
|
|
|
|
|
|
|
/**
|
2012-09-15 06:26:38 +08:00
|
|
|
@brief The function is called when the application enters the foreground
|
|
|
|
@param the pointer of the application instance
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
|
|
|
virtual void applicationWillEnterForeground();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _APP_DELEGATE_H_
|
|
|
|
|