📄 game_engine.h
字号:
// Class automatically generated by Dev-C++ New Class wizard
#ifndef GAME_ENGINE_H
#define GAME_ENGINE_H
//setup Irrlicht definitions
#include <irrlicht.h>
#include "game_stateHandler.h"
#include "game_state.h"
#include "../../Options/ICE_options.h"
class game_EventHandler;
//BASE class
// the main engine structure
class game_Engine : public game_StateHandler {
protected:
game_EventHandler *m_pEventHandler;
irr::u32 m_time ; //current time, updated every Run()
public:
// class constructor
game_Engine();
// class destructor
~game_Engine();
// called to start up the irrlicht engine and set up game variables
bool Init(irr::video::EDriverType device_type = irr::video::EDT_OPENGL,
int res_x = 640, int res_y = 480, bool fullscreen = false,
int colordepth = 16, bool stencilbuffer = false,
const wchar_t *text =L"ICE - IrrLicht Common Engine");
//NO NEED TO OVERLOAD THESE FUNCTIONS:
//event handler
bool OnEvent(irr::SEvent event);
// called in main loop to see if engine is still running
bool Update();
// renders the scene (according to the appropriate state)
void Render();
//ask to be moved to a new state
virtual void RequestStateChange(tGAME_STATE newState) = 0;
private:
void Destroy(); //dont call this directly, call RequestDestroy instead!
};
class game_EventHandler : public irr::IEventReceiver {
game_Engine* m_pBoss;
protected:
friend class game_Engine;
game_EventHandler(game_Engine* boss);
bool OnEvent(irr::SEvent event) ;
};
#endif // GAME_ENGINE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -