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

A Psi Attack state. More...

#include <PsiAttackBState.h>

Inheritance diagram for OpenXcom::PsiAttackBState:
OpenXcom::BattleState

Public Member Functions

 PsiAttackBState (BattlescapeGame *parent, BattleAction action)
 Creates a new PsiAttack state. More...
 
 ~PsiAttackBState ()
 Cleans up the PsiAttack. More...
 
void init ()
 Initializes the state. More...
 
void think ()
 Runs state functionality every cycle. More...
 
void psiAttack ()
 Attempts a panic or mind control action.
 
- 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 Psi Attack state.

Constructor & Destructor Documentation

◆ PsiAttackBState()

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

Creates a new PsiAttack state.

Sets up a PsiAttackBState.

◆ ~PsiAttackBState()

OpenXcom::PsiAttackBState::~PsiAttackBState ( )

Cleans up the PsiAttack.

Deletes the PsiAttackBState.

Member Function Documentation

◆ init()

void OpenXcom::PsiAttackBState::init ( )
virtual

Initializes the state.

Initializes the sequence:

  • checks if the action is valid,
  • adds a psi attack animation to the world.
  • from that point on, the explode state takes precedence.
  • when that state pops, we'll do our first think()

Reimplemented from OpenXcom::BattleState.

◆ think()

void OpenXcom::PsiAttackBState::think ( )
virtual

Runs state functionality every cycle.

After the explosion animation is done doing its thing, make the actual psi attack, and restore the camera/cursor.

Reimplemented from OpenXcom::BattleState.


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