RType
Public Member Functions | List of all members
LobbyScene Class Reference

#include <Lobby.hpp>

Inheritance diagram for LobbyScene:
Inheritance graph
[legend]
Collaboration diagram for LobbyScene:
Collaboration graph
[legend]

Public Member Functions

 LobbyScene (std::shared_ptr< ServerSocket > serverSocket)
 Construct a new LobbyScene object. More...
 
 ~LobbyScene () override=default
 Destroy the LobbyScene object. More...
 
void initScene ()
 initScene, init the scene More...
 
void update (std::shared_ptr< Event > event, std::shared_ptr< Packet > packet) override
 display, display the scene More...
 
void checkBulletDeletion ()
 checkBulletDeletion, check the bullet deletion More...
 
void checkSpawnerActivation ()
 
bool allEnemiesLeftScreen ()
 
bool allBulletsLeftScreen ()
 
void spawnBoss ()
 initServices, init the services More...
 
void shootBoss (int nb)
 shootBoss, boss attacks More...
 
void enemyDeletion ()
 
void bulletDeletion ()
 
void initEntities () override
 initEntities, init the entities More...
 
void initServices () override
 initServices, init the services More...
 
- Public Member Functions inherited from AScene
 AScene (ClientCore *clientCore)
 AScene, constructor of AScene. More...
 
 ~AScene () override=default
 ~AScene, destructor of AScene More...
 
void addComponent (std::shared_ptr< IComponent > component) override
 addComponent, add a component More...
 
std::vector< std::shared_ptr< IComponent > > getComponents () override
 getComponents, get all the components More...
 
void display (sf::RenderWindow &window) override
 display, display the scene More...
 
void handleEvent (const sf::Event &event, sf::RenderWindow &window) override
 handleEvent, handle the event More...
 
void update () override
 update, update the scene More...
 
void pauseScene () override
 pauseScene, pause the scene More...
 
void resumeScene () override
 resumeScene, resume the scene More...
 
void stopScene () override
 stopScene, stop the scene More...
 
 AScene (std::shared_ptr< ServerSocket > serverSocket)
 Construct a new AScene:: AScene object. More...
 
 ~AScene () override=default
 Destroy the AScene:: AScene object. More...
 
void addEntity (std::shared_ptr< IEntity > entity) override
 addEntity, add an entity More...
 
std::vector< std::shared_ptr< IEntity > > getEntities () override
 getEntities, get the entities More...
 
void addService (std::shared_ptr< IService > service) override
 addService, add a service More...
 
std::vector< std::shared_ptr< IService > > getServices () override
 getServices, get the services More...
 
void display () override
 display, display the scene More...
 
void pauseScene () override
 pauseScene, pause the scene More...
 
void resumeScene () override
 resumeScene, resume the scene More...
 
void stopScene () override
 stopScene, stop the scene More...
 
void restartScene () override
 restartScene, restart the scene More...
 
void sendGameState (int clientID) override
 sendGameState, send the game state More...
 
void broadcastGameState () override
 broadcastGameState, broadcast the game state More...
 
- Public Member Functions inherited from IScene
 IScene (ClientCore *clientCore)
 IScene, constructor of IScene. More...
 
virtual ~IScene ()=default
 ~IScene, destructor of IScene More...
 
virtual void receiveData ()=0
 receiveData, receive the data More...
 
- Public Member Functions inherited from ISceneRType
virtual ~ISceneRType ()=default
 Construct a new IScene:: IScene object. More...
 

Additional Inherited Members

- Public Attributes inherited from IScene
bool continueScene = true
 
- Protected Attributes inherited from AScene
std::vector< std::shared_ptr< IComponent > > _components
 
- Protected Attributes inherited from IScene
ClientCore_clientCore
 
timeval _pingTime {}
 
- Protected Attributes inherited from ISceneRType
std::vector< std::shared_ptr< IEntity > > _entities
 
std::vector< std::shared_ptr< IService > > _services
 
std::shared_ptr< ServerSocket_serverSocket
 

Detailed Description

Definition at line 16 of file Lobby.hpp.

Constructor & Destructor Documentation

◆ LobbyScene()

LobbyScene::LobbyScene ( std::shared_ptr< ServerSocket serverSocket)
explicit

Construct a new LobbyScene object.

Construct a new LobbyScene:: LobbyScene object.

Parameters
serverSocket

Definition at line 19 of file Lobby.cpp.

References initScene(), and LobbyScene().

Referenced by LobbyScene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~LobbyScene()

LobbyScene::~LobbyScene ( )
overridedefault

Destroy the LobbyScene object.

Member Function Documentation

◆ allBulletsLeftScreen()

bool LobbyScene::allBulletsLeftScreen ( )

Definition at line 365 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ allEnemiesLeftScreen()

bool LobbyScene::allEnemiesLeftScreen ( )

Definition at line 350 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ bulletDeletion()

void LobbyScene::bulletDeletion ( )

Definition at line 400 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ checkBulletDeletion()

void LobbyScene::checkBulletDeletion ( )

checkBulletDeletion, check the bullet deletion

Definition at line 692 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ checkSpawnerActivation()

void LobbyScene::checkSpawnerActivation ( )

Definition at line 293 of file Lobby.cpp.

References AScene::broadcastGameState(), ENEMY, generateRandomNumber(), newComponent::id, SPRITESOCKET, and newComponent::type.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enemyDeletion()

void LobbyScene::enemyDeletion ( )

Definition at line 380 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ initEntities()

void LobbyScene::initEntities ( )
overridevirtual

initEntities, init the entities

Implements ISceneRType.

Definition at line 43 of file Lobby.cpp.

Referenced by initScene().

Here is the caller graph for this function:

◆ initScene()

void LobbyScene::initScene ( )

initScene, init the scene

Definition at line 34 of file Lobby.cpp.

References initEntities(), and initServices().

Referenced by LobbyScene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initServices()

void LobbyScene::initServices ( )
overridevirtual

initServices, init the services

Implements ISceneRType.

Definition at line 278 of file Lobby.cpp.

Referenced by initScene().

Here is the caller graph for this function:

◆ shootBoss()

void LobbyScene::shootBoss ( int  nb)

shootBoss, boss attacks

Definition at line 237 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ spawnBoss()

void LobbyScene::spawnBoss ( )

initServices, init the services

Definition at line 185 of file Lobby.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ update()

void LobbyScene::update ( std::shared_ptr< Event event,
std::shared_ptr< Packet packet 
)
overridevirtual

display, display the scene

update, update the scene

Parameters
event
window
event
packet

Implements ISceneRType.

Definition at line 419 of file Lobby.cpp.

References allBulletsLeftScreen(), allEnemiesLeftScreen(), AScene::broadcastGameState(), BULLET, bulletDeletion(), checkBulletDeletion(), checkSpawnerActivation(), enemyDeletion(), generateRandomNumber(), newComponent::id, PLAYER, AScene::sendGameState(), shootBoss(), spawnBoss(), SPRITESOCKET, and newComponent::type.

Here is the call graph for this function:

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