Allowing the game to be started

This commit is contained in:
Zoe Roux
2021-06-14 13:36:11 +02:00
parent a42ca68595
commit 60a5ad0ded
7 changed files with 86 additions and 23 deletions
+9
View File
@@ -6,12 +6,17 @@
#include "System/System.hpp"
#include "Component/Lobby/LobbyComponent.hpp"
#include "Component/Controllable/ControllableComponent.hpp"
#include "Entity/Entity.hpp"
namespace BBM
{
//! @brief A system to handle Health entities.
class LobbySystem : public WAL::System<LobbyComponent, Drawable2DComponent>
{
private:
//! @brief Add a controller for the player.
static void _addController(WAL::Entity &player, ControllableComponent::Layout layout);
public:
//! @inherit
void onUpdate(WAL::ViewEntity<LobbyComponent, Drawable2DComponent> &entity, std::chrono::nanoseconds dtime) override;
@@ -23,6 +28,10 @@ namespace BBM
//! @param scene The lobby scene containing lobby players.
static bool playersAreReady(WAL::Scene &scene);
//! @brief Inform the engine that the next scene should be the game scene and load it.
//! @param wal The engine.
static void switchToGame(WAL::Wal &wal);
//! @brief A default constructor
explicit LobbySystem(WAL::Wal &wal);
//! @brief A Lobby system is copy constructable