ai.h
来自「坦克大战游戏.很值得学习的东东.希望对大家有帮助」· C头文件 代码 · 共 35 行
H
35 行
// Ai.h: interface for the CAi class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_AI_H__0B7991A5_CD8A_49FA_907D_E2C1942F8D08__INCLUDED_)
#define AFX_AI_H__0B7991A5_CD8A_49FA_907D_E2C1942F8D08__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CAi
{
public:
bool HitDoopTest();
short Rando(short &way);
short GetWay(POINT &ScreenXY , short way , int n);
CAi();
virtual ~CAi();
private:
bool goback;
POINT p1,p2,p3 ; //碰撞点
void SetHit(POINT ScreenXY,short way);
bool HitSharpTest(short &way, int n);
void Back(POINT &ScreenXY, short &way ,short n); //倒退
bool HitWallTest(POINT &ScreenXY , short &way , int n);
short Scout(POINT Eheat ,POINT Pheart,short &way); //追踪玩家
short m_way; //移动方向(1下2右3上4左)
int j; //循环用
int i;
};
#endif // !defined(AFX_AI_H__0B7991A5_CD8A_49FA_907D_E2C1942F8D08__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?