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

State for dying units. More...

#include <UnitDieBState.h>

Inheritance diagram for OpenXcom::UnitDieBState:
OpenXcom::BattleState

Public Member Functions

 UnitDieBState (BattlescapeGame *parent, BattleUnit *unit, ItemDamageType damageType, bool noSound)
 Creates a new UnitDieBState class. More...
 
 ~UnitDieBState ()
 Cleans up the UnitDieBState. 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.
 
void convertUnitToCorpse ()
 Converts a unit to a corpse. More...
 
void playDeathSound ()
 Plays the death sound.
 
- 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 dying units.

Constructor & Destructor Documentation

OpenXcom::UnitDieBState::UnitDieBState ( BattlescapeGame parent,
BattleUnit unit,
ItemDamageType  damageType,
bool  noSound 
)

Creates a new UnitDieBState class.

Sets up an UnitDieBState.

Parameters
parentPointer to the Battlescape.
unitDying unit.
damageTypeType of damage that caused the death.
noSoundWhether to disable the death sound.
OpenXcom::UnitDieBState::~UnitDieBState ( )

Cleans up the UnitDieBState.

Deletes the UnitDieBState.

Member Function Documentation

void OpenXcom::UnitDieBState::cancel ( )
virtual

Handles a cancels request.

Unit falling cannot be cancelled.

Reimplemented from OpenXcom::BattleState.

void OpenXcom::UnitDieBState::convertUnitToCorpse ( )

Converts a unit to a corpse.

Converts unit to a corpse (item).

void OpenXcom::UnitDieBState::think ( )
virtual

Runs state functionality every cycle.

Progresses the death, displays any messages, checks if the mission is over, ...

Reimplemented from OpenXcom::BattleState.


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