![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
State for dying units. More...
#include <UnitDieBState.h>
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... | |
State for dying units.
| OpenXcom::UnitDieBState::UnitDieBState | ( | BattlescapeGame * | parent, |
| BattleUnit * | unit, | ||
| ItemDamageType | damageType, | ||
| bool | noSound, | ||
| bool | noCorpse | ||
| ) |
Creates a new UnitDieBState class.
Sets up an UnitDieBState.
| parent | Pointer to the Battlescape. |
| unit | Dying unit. |
| damageType | Type of damage that caused the death. |
| noSound | Whether to disable the death sound. |
| noCorpse | Whether to disable the corpse spawn. |
| OpenXcom::UnitDieBState::~UnitDieBState | ( | ) |
Cleans up the UnitDieBState.
Deletes the UnitDieBState.
|
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).
|
virtual |
Runs state functionality every cycle.
Progresses the death, displays any messages, checks if the mission is over, ...
Reimplemented from OpenXcom::BattleState.
1.8.14