OpenXcom  1.0
Open-source clone of the original X-Com
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, bool noCorpse)
 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...
 
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

◆ UnitDieBState()

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

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.
noCorpseWhether to disable the corpse spawn.

◆ ~UnitDieBState()

OpenXcom::UnitDieBState::~UnitDieBState ( )

Cleans up the UnitDieBState.

Deletes the UnitDieBState.

Member Function Documentation

◆ cancel()

void OpenXcom::UnitDieBState::cancel ( )
virtual

Handles a cancels request.

Unit falling cannot be cancelled.

Reimplemented from OpenXcom::BattleState.

◆ convertUnitToCorpse()

void OpenXcom::UnitDieBState::convertUnitToCorpse ( )

Converts a unit to a corpse.

Converts unit to a corpse (item).

◆ think()

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: