![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
A Melee Attack state. More...
#include <MeleeAttackBState.h>
Public Member Functions | |
MeleeAttackBState (BattlescapeGame *parent, BattleAction action) | |
Creates a new MeleeAttackBState class. More... | |
~MeleeAttackBState () | |
Cleans up the MeleeAttackBState. More... | |
void | init () |
Initializes the state. More... | |
void | think () |
Runs state functionality every cycle. More... | |
void | performMeleeAttack () |
Performs a melee attack. More... | |
void | resolveHit () |
Determine if the attack hit, and if so, do stuff. More... | |
![]() | |
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... | |
virtual void | cancel () |
Handles a cancel request. More... | |
BattleAction | getAction () const |
Gets a copy of the action. More... | |
A Melee Attack state.
OpenXcom::MeleeAttackBState::MeleeAttackBState | ( | BattlescapeGame * | parent, |
BattleAction | action | ||
) |
Creates a new MeleeAttackBState class.
Sets up a MeleeAttackBState.
OpenXcom::MeleeAttackBState::~MeleeAttackBState | ( | ) |
Cleans up the MeleeAttackBState.
Deletes the MeleeAttackBState.
|
virtual |
Initializes the state.
Initializes the sequence.
does a lot of validity checking.
Reimplemented from OpenXcom::BattleState.
void OpenXcom::MeleeAttackBState::performMeleeAttack | ( | ) |
Performs a melee attack.
Sets up a melee attack, inserts an explosion into the map and make noises.
void OpenXcom::MeleeAttackBState::resolveHit | ( | ) |
Determine if the attack hit, and if so, do stuff.
Determines if the melee attack hit, and performs all the applicable duties.
|
virtual |
Runs state functionality every cycle.
Performs all the overall functions of the state, this code runs AFTER the explosion state pops.
Reimplemented from OpenXcom::BattleState.