Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
game::state::BattleState Class Reference

This game state does all battling. When the battle is complete it will pop itself from the engine state stack, returning the game to its previous state. More...

#include <BattleState.hpp>

+ Inheritance diagram for game::state::BattleState:

Public Member Functions

virtual ~BattleState ()=default
 Destroy the Battle State object. More...
 
virtual const char * name () const override
 Returns "BattleState". More...
 
virtual void activate (bl::engine::Engine &) override
 Does nothing. More...
 
virtual void deactivate (bl::engine::Engine &) override
 Does nothing. More...
 
virtual void update (bl::engine::Engine &, float dt, float) override
 Calls into the battle's update method. More...
 

Static Public Member Functions

static bl::engine::State::Ptr create (core::system::Systems &systems, std::unique_ptr< core::battle::Battle > &&battle)
 Creates a new BattleState. More...
 

Protected Attributes

core::system::Systemssystems
 

Detailed Description

This game state does all battling. When the battle is complete it will pop itself from the engine state stack, returning the game to its previous state.

Definition at line 20 of file BattleState.hpp.

Constructor & Destructor Documentation

◆ ~BattleState()

virtual game::state::BattleState::~BattleState ( )
virtualdefault

Destroy the Battle State object.

Member Function Documentation

◆ activate()

void game::state::BattleState::activate ( bl::engine::Engine &  engine)
overridevirtual

Does nothing.

Implements game::state::State.

Definition at line 52 of file BattleState.cpp.

◆ create()

bl::engine::State::Ptr game::state::BattleState::create ( core::system::Systems systems,
std::unique_ptr< core::battle::Battle > &&  battle 
)
static

Creates a new BattleState.

Parameters
systemsThe main game systems
battleThe battle to run. Must be fully initialized
Returns
bl::engine::State::Ptr The new game state

Definition at line 34 of file BattleState.cpp.

◆ deactivate()

void game::state::BattleState::deactivate ( bl::engine::Engine &  engine)
overridevirtual

Does nothing.

Implements game::state::State.

Definition at line 63 of file BattleState.cpp.

◆ name()

const char * game::state::BattleState::name ( ) const
overridevirtual

Returns "BattleState".

Implements game::state::State.

Definition at line 50 of file BattleState.cpp.

◆ update()

void game::state::BattleState::update ( bl::engine::Engine &  engine,
float  dt,
float   
)
overridevirtual

Calls into the battle's update method.

Parameters
dtTime elapsed in seconds

Implements game::state::State.

Definition at line 70 of file BattleState.cpp.

Member Data Documentation

◆ systems

core::system::Systems& game::state::State::systems
protectedinherited

Definition at line 66 of file State.hpp.


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