aigenerator.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:1k
- #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