2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-31 18:29:44 +08:00
|
|
|
typedef enum {
|
|
|
|
kCCDirectorProjection2D,
|
|
|
|
kCCDirectorProjection3D,
|
|
|
|
kCCDirectorProjectionCustom,
|
|
|
|
kCCDirectorProjectionDefault = kCCDirectorProjection3D,
|
|
|
|
} ccDirectorProjection;
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCDirector : public CCObject
|
|
|
|
{
|
|
|
|
CCScene* getRunningScene(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
double getAnimationInterval(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-15 15:46:01 +08:00
|
|
|
bool isDisplayStats(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
bool isPaused(void);
|
2012-06-15 10:51:53 +08:00
|
|
|
unsigned int getTotalFrames(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-28 14:53:52 +08:00
|
|
|
CCEGLViewProtocol* getOpenGLView(void);
|
2012-08-10 18:14:04 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCSize getWinSize(void);
|
|
|
|
CCSize getWinSizeInPixels(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCPoint convertToGL(CCPoint obPoint);
|
|
|
|
CCPoint convertToUI(CCPoint obPoint);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void pause();
|
|
|
|
void resume();
|
|
|
|
void purgeCachedData(void);
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void runWithScene(CCScene *pScene);
|
|
|
|
void pushScene(CCScene *pScene);
|
|
|
|
void popScene(void);
|
|
|
|
void replaceScene(CCScene *pScene);
|
2012-08-28 15:54:19 +08:00
|
|
|
void end @ endToLua ();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
float getContentScaleFactor(void);
|
2012-12-02 15:48:15 +08:00
|
|
|
void setContentScaleFactor(float scaleFactor);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
CCScheduler* getScheduler();
|
|
|
|
CCActionManager* getActionManager();
|
|
|
|
CCTouchDispatcher* getTouchDispatcher();
|
2012-12-02 15:48:15 +08:00
|
|
|
// CCKeypadDispatcher* getKeypadDispatcher();
|
|
|
|
// CCAccelerometer* getAccelerometer();
|
2012-04-26 09:34:42 +08:00
|
|
|
|
2012-08-21 18:42:35 +08:00
|
|
|
void setDepthTest(bool var);
|
2012-08-31 18:29:44 +08:00
|
|
|
void setProjection(ccDirectorProjection kProjection);
|
|
|
|
ccDirectorProjection getProjection(void);
|
|
|
|
|
|
|
|
CCNode* getNotificationNode();
|
|
|
|
void setNotificationNode(CCNode *node);
|
|
|
|
|
|
|
|
float getZEye(void);
|
|
|
|
CCSize getVisibleSize();
|
|
|
|
CCPoint getVisibleOrigin();
|
2012-08-21 18:42:35 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCDirector* sharedDirector(void);
|
|
|
|
};
|