?? game_statehandler.h
字號:
// Class automatically generated by Dev-C++ New Class wizard
#ifndef GAME_STATEHANDLER_H
#define GAME_STATEHANDLER_H
#include <irrlicht.h>
//using namespace irr;
#include "../game_states.h"
class game_State;
//typedef enum tGAME_STATE;
// BASE CLASS
// provides game_tetris with neccesary functionality to handle game_State derivatives
class game_StateHandler
{
public:
// class constructor
game_StateHandler();
// class destructor
~game_StateHandler();
protected:
tGAME_STATE m_GameState; //enum of the current state
game_State *m_pCurrState; //pointer to the current state
bool destroyMe; //set by requestDestroy, will call Destroy() if true
irr::IrrlichtDevice *m_device; //irrlicht device pointer
irr::video::IVideoDriver *m_driver; //irrlicht video driver pointer
irr::scene::ISceneManager *m_smgr; //irrlicht scene manager ptr
public:
irr::IrrlichtDevice *getDevice() {return m_device; }
irr::video::IVideoDriver *getDriver() {return m_driver; }
irr::scene::ISceneManager *getSceneMgr() { return m_smgr; }
//passively tell game to quit (will be handled next loop)
void RequestDestroy() { destroyMe = true; }
//ask the handler to transition to a different state
//(the hanlder can decide not to, or call other functions first)
virtual void RequestStateChange(tGAME_STATE newState) = 0;
};
#endif // GAME_STATEHANDLER_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -