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

📄 aaiattack.h

📁 这是整套横扫千军3D版游戏的源码
💻 H
字号:
// -------------------------------------------------------------------------
// AAI
//
// A skirmish AI for the TA Spring engine.
// Copyright Alexander Seizinger
// 
// Released under GPL license: see LICENSE.html for more information.
// -------------------------------------------------------------------------


#pragma once

#include "aidef.h"
#include <set>
using namespace std;

class AAI;
class AAISector;
class AAIGroup;

class AAIAttack
{
public:
	AAIAttack(AAI *ai);
	~AAIAttack(void);

	void AddGroup(AAIGroup *group);

	void RemoveGroup(AAIGroup *group);

	// returns true if attack has failed 
	bool Failed();

	// orders units to attack specidied sector
	void AttackSector(AAISector *sector, AttackType type);

	// orders all units involved to retreat
	void StopAttack();

	// target sector
	AAISector *dest;

	AttackType type;

	// tick when last attack order has been given (to prevent overflow when unit gets stuck and sends "unit idel" all the time) 
	int lastAttack;

	// specifies what kind of sector the involved unit groups may attack
	bool land;
	bool water;

	// groups participating
	set<AAIGroup*> combat_groups; 
	set<AAIGroup*> aa_groups;
	set<AAIGroup*> arty_groups;

private:
	AAI *ai;
};

⌨️ 快捷键说明

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