22 #ifndef SCUMM_HE_MOONBASE_AI_DEFENCEUNIT_H 23 #define SCUMM_HE_MOONBASE_AI_DEFENCEUNIT_H 66 void setID(
int id) { _id = id; }
67 void setDistanceTo(
int distanceTo) { _distanceTo = distanceTo; }
68 void setState(
int state) { _state = state; }
69 void setRadius(
int radius) { _radius = radius; }
70 void setArmor(
int armor) { _armor = armor; }
71 void setDamage(
int damage) { _armor -= damage; }
72 void setPos(
int x,
int y) {
76 void setCost(
int cost) { _cost = cost; }
78 int getID()
const {
return _id; }
79 int getDistanceTo()
const {
return _distanceTo; }
80 int getState()
const {
return _state; }
81 int getRadius()
const {
return _radius; }
82 int getArmor()
const {
return _armor; }
83 int getPosX()
const {
return _pos.
x; }
84 int getPosY()
const {
return _pos.
y; }
85 int getCost()
const {
return _cost; }
87 virtual int getType()
const = 0;
89 virtual Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY) = 0;
90 virtual int selectWeapon(
int index) = 0;
99 int getType()
const override {
return DUT_ANTI_AIR; }
100 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
101 int selectWeapon(
int index)
override;
110 int getType()
const override {
return DUT_SHIELD; }
111 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
112 int selectWeapon(
int index)
override;
121 int getType()
const override {
return DUT_MINE; }
122 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
123 int selectWeapon(
int index)
override;
132 int getType()
const override {
return DUT_HUB; }
133 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
134 int selectWeapon(
int index)
override;
143 int getType()
const override {
return DUT_TOWER; }
144 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
145 int selectWeapon(
int index)
override;
154 int getType()
const override {
return DUT_BRIDGE; }
155 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
156 int selectWeapon(
int index)
override;
165 int getType()
const override {
return DUT_ENERGY; }
166 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
167 int selectWeapon(
int index)
override;
176 int getType()
const override {
return DUT_OFFENSE; }
177 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
178 int selectWeapon(
int index)
override;
187 int getType()
const override {
return DUT_CRAWLER; }
188 Common::Point *createTargetPos(
int index,
int distance,
int weaponType,
int sourceX,
int sourceY)
override;
189 int selectWeapon(
int index)
override;
Definition: ai_defenseunit.h:93
Definition: ai_defenseunit.h:148
Definition: ai_defenseunit.h:159
Definition: ai_defenseunit.h:47
Definition: ai_defenseunit.h:181
Definition: ai_defenseunit.h:126
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47
Definition: ai_defenseunit.h:115
Definition: ai_defenseunit.h:104
Definition: ai_defenseunit.h:137
Definition: ai_defenseunit.h:170