-
Notifications
You must be signed in to change notification settings - Fork 7.1k
/
Copy pathApplication.h
41 lines (33 loc) · 1.1 KB
/
Application.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __COCOS2D_HELLOWORLD_APP_H__
#define __COCOS2D_HELLOWORLD_APP_H__
#include "TG3.h"
#include "cocos2d.h"
#include "AppDelegate.h"
class Application : public TApplication, public cocos2d::ccxApplication
{
public:
Application();
virtual ~Application();
virtual Boolean EventHandler(EventType * pEvent);
public:
// implement the virtual interface of class ccxApplication
virtual bool initInstance();
virtual void setAnimationInterval(double interval);
virtual Orientation setOrientation(Orientation orientation);
virtual void statusBarFrame(cocos2d::CGRect * rect);
virtual const char* getAppDataPath();
virtual void switchNotify(int nTurnOn);
protected:
bool isInBackground();
void StartMainLoop();
void StopMainLoop();
private:
static Int32 _OnAppIdle(MESSAGE_t * pMsg, UInt32 uData);
MESSAGE_t m_tMsg;
bool m_bRunning;
bool m_bNeedStop;
bool m_bInBackground;
char m_AppDataPath[EOS_FILE_MAX_PATH];
AppDelegate m_Delegate;
};
#endif