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

State that renders and implements a store menu to buy and sell items. More...

#include <StoreMenu.hpp>

+ Inheritance diagram for game::state::StoreMenu:

Public Member Functions

virtual ~StoreMenu ()=default
 Destroy the Store State object. More...
 
virtual const char * name () const override
 Returns "StoreMenu". More...
 
virtual void activate (bl::engine::Engine &engine) override
 Subscribes to event buses. More...
 
virtual void deactivate (bl::engine::Engine &engine) override
 Unsubscribes from event buses. More...
 
virtual void update (bl::engine::Engine &engine, float dt, float) override
 Updates the store menu. More...
 

Static Public Member Functions

static bl::engine::State::Ptr create (core::system::Systems &systems, const core::event::StoreOpened &data)
 Create a new StoreMenu. More...
 

Protected Attributes

core::system::Systemssystems
 

Detailed Description

State that renders and implements a store menu to buy and sell items.

Definition at line 23 of file StoreMenu.hpp.

Constructor & Destructor Documentation

◆ ~StoreMenu()

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

Destroy the Store State object.

Member Function Documentation

◆ activate()

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

Subscribes to event buses.

Parameters
engineThe game engine

Implements game::state::State.

Definition at line 124 of file StoreMenu.cpp.

◆ create()

bl::engine::State::Ptr game::state::StoreMenu::create ( core::system::Systems systems,
const core::event::StoreOpened data 
)
static

Create a new StoreMenu.

Parameters
systemsThe main game systems
dataThe items to populate the store with
Returns
bl::engine::State::Ptr The new store state

Definition at line 27 of file StoreMenu.cpp.

◆ deactivate()

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

Unsubscribes from event buses.

Parameters
engineThe game engine

Implements game::state::State.

Definition at line 208 of file StoreMenu.cpp.

◆ name()

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

Returns "StoreMenu".

Implements game::state::State.

Definition at line 122 of file StoreMenu.cpp.

◆ update()

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

Updates the store menu.

Parameters
engineThe game engine
dtTime elapsed in seconds since the last call to update

Implements game::state::State.

Definition at line 214 of file StoreMenu.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: