📄 aigenerator.h
字号:
#ifndef _AIGENERATOR_H
#define _AIGENERATOR_H
#include "object.h"
#define DEFMAXPROB 60
#define DEFTRACKSCOPE 80
struct AIGEN_AIM {
int prob;
};
//-----------------------------------------------------------------------------
// Name: class CAiGenerator
// Desc: Class to create a common used AI generator
//-----------------------------------------------------------------------------
class CAiGenerator {
int CmdProbs[6];
RECT m_rtAvoid[5];
CMobileObject *m_pAim;
int m_nAimProb;
int m_nTrackProb;
int m_nMaxProb;
int m_nCurrentProb;
int m_nFireMaxProb;
int m_nFireProb;
bool m_bLastBlock;
RECT m_LastPos;
TANKCMD m_LastCmd;
CMobileObject **m_LastAim;
RECT m_rtScope;
CObjTank *m_pHost;
public:
CAiGenerator();
~CAiGenerator();
// Status functions
RECT GetScope() { return m_rtScope; }
void SetScope( RECT s) { m_rtScope = s; }
// Access functions
void SetAvoid ( RECT rt );
void SetAim( CMobileObject *pmo, int prob );
// Creation/destruction methods
bool CreateGenerator( CObjTank *ptk, RECT scope );
// Methods
TANKCMD Generator( CMobileObject **ppmos, int num );
};
#endif // _AIGENERATOR_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -