⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 groupai.h

📁 这是整套横扫千军3D版游戏的源码
💻 H
字号:
// GroupAI.h: interface for the CGroupAI class.
// Dont modify this file
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GroupAI_H__10718E36_5CDF_4CD4_8D90_F41311DD2694__INCLUDED_)
#define AFX_GroupAI_H__10718E36_5CDF_4CD4_8D90_F41311DD2694__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ExternalAI/IGroupAI.h"
#include <map>
#include <set>

const char AI_NAME[]="Metal maker AI";

using namespace std;

class CGroupAI : public IGroupAI  
{
public:
	CGroupAI();
	virtual ~CGroupAI();

	virtual void InitAi(IGroupAICallback* callback);

	virtual bool AddUnit(int unit);
	virtual void RemoveUnit(int unit);

	virtual void GiveCommand(Command* c);
	virtual const vector<CommandDescription>& GetPossibleCommands(){return commands;};
	virtual int GetDefaultCmd(int unitid);

	virtual void CommandFinished(int squad,int type){};

	virtual void Update();
	virtual void DrawCommands(){};

	struct UnitInfo{
		float energyUse;
		bool turnedOn;
	};

	map<int,UnitInfo*> myUnits;

	int lastUpdate;
	float lastEnergy;

	vector<CommandDescription> commands;
	IGroupAICallback* callback;
	IAICallback* aicb;

	set<int> currentCommands;
	virtual void Load(IGroupAICallback* callback,std::ifstream *ifs){};
	virtual void Save(std::ifstream *ifs){};
};

#endif // !defined(AFX_GroupAI_H__10718E36_5CDF_4CD4_8D90_F41311DD2694__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -