Bomberman
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BBM::IAControllableSystem Class Reference

A system to handle keyboard entities. More...

#include <IAControllableSystem.hpp>

Inheritance diagram for BBM::IAControllableSystem:
Collaboration diagram for BBM::IAControllableSystem:

Public Member Functions

void onFixedUpdate (WAL::ViewEntity< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent > &entity) override
 
void onSelfUpdate (std::chrono::nanoseconds dtime) override
 A method called after all entities that this system manage has been updated. More...
 
 IAControllableSystem (WAL::Wal &wal)
 A default constructor. More...
 
 IAControllableSystem (const IAControllableSystem &)=default
 A keyboard system is copy constructable. More...
 
 ~IAControllableSystem () override=default
 A default destructor. More...
 
IAControllableSystemoperator= (const IAControllableSystem &)=default
 A keyboard system is assignable. More...
 
- Public Member Functions inherited from WAL::System< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent >
 ~System () override=default
 A virtual, default, destructor. More...
 
 System (System &&) noexcept=default
 A system can be moved. More...
 
View< Dependencies... > & getView () override
 Get a view of all entities containing every dependencies of this system. More...
 
virtual void onUpdate (ViewEntity< Dependencies... > &entity, std::chrono::nanoseconds dtime)
 Update the corresponding component of the given entity. More...
 
virtual void onFixedUpdate (ViewEntity< Dependencies... > &entity)
 An alternative of onUpdate that is called every 8ms (120 times per seconds). If the system slow down, it will try to catch up. More...
 
void update (std::chrono::nanoseconds dtime) final
 Update the whole system (every entities that this system is responsible can be updated. More...
 
void fixedUpdate () final
 An alternative of update that is called every 8ms (120 times per seconds). If the system slow down, it will try to catch up. More...
 
- Public Member Functions inherited from WAL::ISystem
virtual ~ISystem ()=default
 A virtual default destructor. More...
 

Private Member Functions

void updateDangerBomb (Vector3f pos, int radius, std::chrono::nanoseconds ringIn)
 update danger map with a bomb More...
 
void registerFunc (LuaG::State &state)
 Register the functions to the lua. More...
 
void UpdateMapInfos (WAL::ViewEntity< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent > &entity)
 update the raw info of the map More...
 

Private Attributes

WAL::Wal_wal
 Reference to wal to get Views. More...
 
bool _cached
 Are the infos cached for current update. More...
 
LuaMap _luamap
 Map to handle the informations. More...
 
std::vector< MapInfo_players
 All players in the map. More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::System< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent >
 System (Wal &wal)
 A system can't be instantiated, it should be derived. More...
 
 System (const System &)=default
 A system can't be instantiated, it should be derived. More...
 
Systemoperator= (const System &)=default
 A system can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::System< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent >
Wal_wal
 A reference to the ECS. More...
 

Detailed Description

A system to handle keyboard entities.

Constructor & Destructor Documentation

◆ IAControllableSystem() [1/2]

BBM::IAControllableSystem::IAControllableSystem ( WAL::Wal wal)

A default constructor.

◆ IAControllableSystem() [2/2]

BBM::IAControllableSystem::IAControllableSystem ( const IAControllableSystem )
default

A keyboard system is copy constructable.

◆ ~IAControllableSystem()

BBM::IAControllableSystem::~IAControllableSystem ( )
overridedefault

A default destructor.

Member Function Documentation

◆ onFixedUpdate()

void BBM::IAControllableSystem::onFixedUpdate ( WAL::ViewEntity< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent > &  entity)
override

◆ onSelfUpdate()

void BBM::IAControllableSystem::onSelfUpdate ( std::chrono::nanoseconds  dtime)
overridevirtual

A method called after all entities that this system manage has been updated.

Parameters
dtimeThe delta time.

Reimplemented from WAL::System< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent >.

◆ operator=()

IAControllableSystem& BBM::IAControllableSystem::operator= ( const IAControllableSystem )
default

A keyboard system is assignable.

◆ registerFunc()

void BBM::IAControllableSystem::registerFunc ( LuaG::State state)
private

Register the functions to the lua.

◆ updateDangerBomb()

void BBM::IAControllableSystem::updateDangerBomb ( Vector3f  pos,
int  radius,
std::chrono::nanoseconds  ringIn 
)
private

update danger map with a bomb

◆ UpdateMapInfos()

void BBM::IAControllableSystem::UpdateMapInfos ( WAL::ViewEntity< PositionComponent, ControllableComponent, IAControllableComponent, BombHolderComponent > &  entity)
private

update the raw info of the map

Member Data Documentation

◆ _cached

bool BBM::IAControllableSystem::_cached
private

Are the infos cached for current update.

◆ _luamap

LuaMap BBM::IAControllableSystem::_luamap
private

Map to handle the informations.

◆ _players

std::vector<MapInfo> BBM::IAControllableSystem::_players
private

All players in the map.

◆ _wal

WAL::Wal& BBM::IAControllableSystem::_wal
private

Reference to wal to get Views.


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