|
Bomberman
|
A system to handle Health entities. More...
#include <LobbySystem.hpp>
Public Member Functions | |
| void | onUpdate (WAL::ViewEntity< LobbyComponent, Drawable2DComponent > &entity, std::chrono::nanoseconds dtime) override |
| void | onSelfUpdate (std::chrono::nanoseconds dtime) override |
| A method called after all entities that this system manage has been updated. More... | |
| void | unloadLobby () |
| Reset the lobby scene to it's default state. More... | |
| void | addAI () |
| Add an AI to the game. More... | |
| void | removeAI () |
| Remove an AI from the game. More... | |
| LobbySystem (WAL::Wal &wal) | |
| A default constructor. More... | |
| LobbySystem (const LobbySystem &)=default | |
| A Lobby system is copy constructable. More... | |
| ~LobbySystem () override=default | |
| A default destructor. More... | |
| LobbySystem & | operator= (const LobbySystem &)=delete |
| A system is not assignable. More... | |
Public Member Functions inherited from WAL::System< LobbyComponent, Drawable2DComponent > | |
| ~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... | |
Static Public Member Functions | |
| static void | addController (WAL::Entity &player, ControllableComponent::Layout layout) |
| Add a controller for the player. More... | |
| static void | createTile (const std::shared_ptr< WAL::Scene > &drawable, WAL::Entity &player, int color, int playerCount) |
| Create ingame tile. More... | |
| static bool | playersAreReady (WAL::Scene &scene) |
| Check if every player is ready. More... | |
| static void | switchToGame (WAL::Wal &wal) |
| Inform the engine that the next scene should be the game scene and load it. More... | |
Static Public Attributes | |
| static std::array< std::string, 4 > | colors |
Private Member Functions | |
| bool | _canJoin () |
| void | _nextColor (WAL::ViewEntity< LobbyComponent, Drawable2DComponent > &entity) |
Private Attributes | |
| std::array< bool, 4 > | _colorTaken = {} |
Static Private Attributes | |
| static std::array< RAY::Color, 4 > | _rayColors |
Additional Inherited Members | |
Protected Member Functions inherited from WAL::System< LobbyComponent, Drawable2DComponent > | |
| 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... | |
| System & | operator= (const System &)=default |
| A system can't be instantiated, it should be derived. More... | |
Protected Attributes inherited from WAL::System< LobbyComponent, Drawable2DComponent > | |
| Wal & | _wal |
| A reference to the ECS. More... | |
A system to handle Health entities.
|
explicit |
A default constructor.
|
default |
A Lobby system is copy constructable.
|
overridedefault |
A default destructor.
|
private |
|
private |
| void BBM::LobbySystem::addAI | ( | ) |
Add an AI to the game.
|
static |
Add a controller for the player.
|
static |
Create ingame tile.
|
overridevirtual |
A method called after all entities that this system manage has been updated.
| dtime | The delta time. |
Reimplemented from WAL::System< LobbyComponent, Drawable2DComponent >.
|
override |
|
delete |
A system is not assignable.
|
static |
Check if every player is ready.
| scene | The lobby scene containing lobby players. |
| void BBM::LobbySystem::removeAI | ( | ) |
Remove an AI from the game.
|
static |
Inform the engine that the next scene should be the game scene and load it.
| wal | The engine. |
| void BBM::LobbySystem::unloadLobby | ( | ) |
Reset the lobby scene to it's default state.
|
private |
|
staticprivate |
|
static |
1.8.17