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::UnitPanicBState Class Reference

State for panicking units. More...

#include <UnitPanicBState.h>

Inheritance diagram for OpenXcom::UnitPanicBState:
OpenXcom::BattleState

Public Member Functions

 UnitPanicBState (BattlescapeGame *parent, BattleUnit *unit)
 Creates a new UnitPanicBState class. More...
 
 ~UnitPanicBState ()
 Cleans up the UnitPanicBState. More...
 
void init ()
 Initializes the state.
 
void cancel ()
 Handles a cancels request. More...
 
void think ()
 Runs state functionality every cycle. More...
 
std::string getResult () const
 Gets the result of the state.
 
- Public Member Functions inherited from OpenXcom::BattleState
 BattleState (BattlescapeGame *parent, BattleAction action)
 Creates a new BattleState linked to the game. More...
 
 BattleState (BattlescapeGame *parent)
 Creates a new BattleState linked to the game. More...
 
virtual ~BattleState ()
 Cleans up the BattleState. More...
 
BattleAction getAction () const
 Gets a copy of the action. More...
 

Detailed Description

State for panicking units.

Constructor & Destructor Documentation

OpenXcom::UnitPanicBState::UnitPanicBState ( BattlescapeGame parent,
BattleUnit unit 
)

Creates a new UnitPanicBState class.

Sets up an UnitPanicBState.

Parameters
parentPointer to the Battlescape.
unitPanicking unit.
OpenXcom::UnitPanicBState::~UnitPanicBState ( )

Cleans up the UnitPanicBState.

Deletes the UnitPanicBState.

Member Function Documentation

void OpenXcom::UnitPanicBState::cancel ( )
virtual

Handles a cancels request.

Panicking cannot be cancelled.

Reimplemented from OpenXcom::BattleState.

void OpenXcom::UnitPanicBState::think ( )
virtual

Runs state functionality every cycle.

Ends the panicking when done.

Reimplemented from OpenXcom::BattleState.


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