state.h
来自「很好的编程实例 有很多 从中可以学到很多东西」· C头文件 代码 · 共 33 行
H
33 行
#ifndef STATE_H
#define STATE_H
//------------------------------------------------------------------------
//
// Name: State.h
//
// Desc: abstract base class to define an interface for a state
//
// Author: Mat Buckland 2002 (fup@ai-junkie.com)
//
//------------------------------------------------------------------------
class Miner;
class State
{
public:
virtual ~State(){}
//this will execute when the state is entered
virtual void Enter(Miner*)=0;
//this is the state's normal update function
virtual void Execute(Miner*)=0;
//this will execute when the state is exited. (My word, isn't
//life full of surprises... ;o))
virtual void Exit(Miner*)=0;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?