OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::CivilianBAIState Class Reference

This is the intial AI state of units, walking around and looking for intruders. More...

#include <CivilianBAIState.h>

Inheritance diagram for OpenXcom::CivilianBAIState:
OpenXcom::BattleAIState

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...
 

Detailed Description

This is the intial AI state of units, walking around and looking for intruders.

Constructor & Destructor Documentation

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.

Parameters
savePointer to the battle game.
unitPointer to the unit.
nodePointer to the node the unit originates from.
OpenXcom::CivilianBAIState::~CivilianBAIState ( )

Cleans up the BattleAIState.

Deletes the CivilianBAIState.

Member Function Documentation

void OpenXcom::CivilianBAIState::enter ( )
virtual

Enters the state.

Enters the current AI state.

Reimplemented from OpenXcom::BattleAIState.

void OpenXcom::CivilianBAIState::exit ( )
virtual

Exits the state.

Exits the current AI state.

Reimplemented from OpenXcom::BattleAIState.

void OpenXcom::CivilianBAIState::load ( const YAML::Node &  node)

Loads the AI state from YAML.

Loads the AI state from a YAML file.

Parameters
nodeYAML node.
YAML::Node OpenXcom::CivilianBAIState::save ( ) const
virtual

Saves the AI state to YAML.

Saves the AI state to a YAML file.

Returns
YAML node.

Reimplemented from OpenXcom::BattleAIState.

void OpenXcom::CivilianBAIState::think ( BattleAction action)
virtual

Runs state functionality every AI cycle.

Runs any code the state needs to keep updating every AI cycle.

Parameters
action(possible) AI action to execute after thinking is done.

Reimplemented from OpenXcom::BattleAIState.


The documentation for this class was generated from the following files: