OpenXcom
1.0
Open-source clone of the original X-Com
|
This is the intial AI state of units, walking around and looking for intruders. More...
#include <CivilianBAIState.h>
Public Member Functions | |
CivilianBAIState (SavedBattleGame *save, BattleUnit *unit, Node *node) | |
Creates a new BattleAIState linked to the game and a certain unit. More... | |
~CivilianBAIState () | |
Cleans up the BattleAIState. More... | |
void | load (const YAML::Node &node) |
Loads the AI state from YAML. More... | |
YAML::Node | save () const |
Saves the AI state to YAML. More... | |
void | enter () |
Enters the state. More... | |
void | exit () |
Exits the state. More... | |
void | think (BattleAction *action) |
Runs state functionality every AI cycle. More... | |
Public Member Functions inherited from OpenXcom::BattleAIState | |
BattleAIState (SavedBattleGame *save, BattleUnit *unit) | |
Creates a new BattleAIState linked to the game and a certain unit. More... | |
virtual | ~BattleAIState () |
Cleans up the BattleAIState. More... | |
void | load (const YAML::Node &node) |
Loads the AI state from YAML. More... | |
This is the intial AI state of units, walking around and looking for intruders.
OpenXcom::CivilianBAIState::CivilianBAIState | ( | SavedBattleGame * | save, |
BattleUnit * | unit, | ||
Node * | node | ||
) |
Creates a new BattleAIState linked to the game and a certain unit.
Sets up a CivilianBAIState.
save | Pointer to the battle game. |
unit | Pointer to the unit. |
node | Pointer to the node the unit originates from. |
OpenXcom::CivilianBAIState::~CivilianBAIState | ( | ) |
Cleans up the BattleAIState.
Deletes the CivilianBAIState.
|
virtual |
|
virtual |
void OpenXcom::CivilianBAIState::load | ( | const YAML::Node & | node | ) |
Loads the AI state from YAML.
Loads the AI state from a YAML file.
node | YAML node. |
|
virtual |
Saves the AI state to YAML.
Saves the AI state to a YAML file.
Reimplemented from OpenXcom::BattleAIState.
|
virtual |
Runs state functionality every AI cycle.
Runs any code the state needs to keep updating every AI cycle.
action | (possible) AI action to execute after thinking is done. |
Reimplemented from OpenXcom::BattleAIState.