2012-08-02 13:02:59 +08:00
|
|
|
/*
|
|
|
|
* CCAplication.h
|
|
|
|
*
|
|
|
|
* Created on: Aug 8, 2011
|
|
|
|
* Author: laschweinski
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CCAPLICATION_H_
|
|
|
|
#define CCAPLICATION_H_
|
|
|
|
|
|
|
|
#include "CCCommon.h"
|
|
|
|
#include "platform/CCApplicationProtocol.h"
|
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
class CCRect;
|
|
|
|
|
|
|
|
class CCApplication : public CCApplicationProtocol
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CCApplication();
|
|
|
|
virtual ~CCApplication();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Callback by CCDirector for limit FPS.
|
|
|
|
@interval The time, which expressed in second in second, between current frame and next.
|
|
|
|
*/
|
|
|
|
void setAnimationInterval(double interval);
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Run the message loop.
|
|
|
|
*/
|
|
|
|
int run();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Get current applicaiton instance.
|
|
|
|
@return Current application instance pointer.
|
|
|
|
*/
|
|
|
|
static CCApplication& sharedApplication();
|
|
|
|
|
2012-08-03 13:56:18 +08:00
|
|
|
/* override functions */
|
2012-08-02 13:02:59 +08:00
|
|
|
virtual ccLanguageType getCurrentLanguage();
|
2012-08-03 13:56:18 +08:00
|
|
|
|
|
|
|
/* set the Resource root path */
|
|
|
|
void setResourceRootPath(const char* pszRootResDir);
|
|
|
|
/* get the Resource root path */
|
|
|
|
const char* getResourceRootPath(void);
|
2012-08-02 13:02:59 +08:00
|
|
|
protected:
|
|
|
|
long m_nAnimationInterval; //micro second
|
|
|
|
|
|
|
|
static CCApplication * sm_pSharedApplication;
|
|
|
|
};
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* CCAPLICATION_H_ */
|