OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::MeleeAttackBState Class Reference

A Melee Attack state. More...

#include <MeleeAttackBState.h>

Inheritance diagram for OpenXcom::MeleeAttackBState:
OpenXcom::BattleState

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...
 
- 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...
 
virtual void cancel ()
 Handles a cancel request. More...
 
BattleAction getAction () const
 Gets a copy of the action. More...
 

Detailed Description

A Melee Attack state.

Constructor & Destructor Documentation

◆ MeleeAttackBState()

OpenXcom::MeleeAttackBState::MeleeAttackBState ( BattlescapeGame parent,
BattleAction  action 
)

Creates a new MeleeAttackBState class.

Sets up a MeleeAttackBState.

◆ ~MeleeAttackBState()

OpenXcom::MeleeAttackBState::~MeleeAttackBState ( )

Cleans up the MeleeAttackBState.

Deletes the MeleeAttackBState.

Member Function Documentation

◆ init()

void OpenXcom::MeleeAttackBState::init ( )
virtual

Initializes the state.

Initializes the sequence.

does a lot of validity checking.

Reimplemented from OpenXcom::BattleState.

◆ performMeleeAttack()

void OpenXcom::MeleeAttackBState::performMeleeAttack ( )

Performs a melee attack.

Sets up a melee attack, inserts an explosion into the map and make noises.

◆ resolveHit()

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.

◆ think()

void OpenXcom::MeleeAttackBState::think ( )
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.


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