gamestate.h
来自「VIGASOCO (VIdeo GAmes SOurce COde) Windo」· C头文件 代码 · 共 45 行
H
45 行
// GameState.h
//
// Class that defines the interface for all game states and substates
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _GAME_STATE_H_
#define _GAME_STATE_H_
class GameState
{
// fields:
public:
int substate;
// methods
public:
virtual void run() = 0;
// initialization and cleanup
GameState(){}
virtual ~GameState(){}
};
class GameSubstate
{
// methods
public:
virtual void run() = 0;
// initialization and cleanup
GameSubstate(){}
virtual ~GameSubstate(){}
};
class NopState : public GameState
{
// methods
public:
virtual void run() {}
};
#endif // _GAME_STATE_H_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?