My Project
Public Member Functions | List of all members
System::ShootSystem Class Reference

The Shoot System class, it handles all packets related to a mouse click by the user, generating a bullet. More...

#include <ShootSystem.hpp>

Public Member Functions

 ShootSystem ()
 Construct a new Shoot System object.
 
void operator() (Registry &registry, Sparse_array< component::cnetwork_queue_t > &netqueue, Sparse_array< component::cposition_t > &position, Sparse_array< component::clobby_id_t > &lobbyId, Sparse_array< component::cnet_id_to_client_id_t > &netIdToClientId, Sparse_array< component::chealth_t > &health)
 The main handler for the Shoot System. More...
 
Entity createBullet (Registry &registry, Sparse_array< component::cposition_t > &position, uint16_t playerId, int lobbyId)
 Create a Bullet object. More...
 

Detailed Description

The Shoot System class, it handles all packets related to a mouse click by the user, generating a bullet.

Member Function Documentation

◆ createBullet()

Entity System::ShootSystem::createBullet ( Registry registry,
Sparse_array< component::cposition_t > &  position,
uint16_t  playerId,
int  lobbyId 
)

Create a Bullet object.

Parameters
registryThe registry that contains all the ECS
positionThe sparse array of position entities
playerIdThe id of the player who shot
lobbyIdThe id of the lobby
Returns
Entity the bullet entity

◆ operator()()

void System::ShootSystem::operator() ( Registry registry,
Sparse_array< component::cnetwork_queue_t > &  netqueue,
Sparse_array< component::cposition_t > &  position,
Sparse_array< component::clobby_id_t > &  lobbyId,
Sparse_array< component::cnet_id_to_client_id_t > &  netIdToClientId,
Sparse_array< component::chealth_t > &  health 
)

The main handler for the Shoot System.

Parameters
registryThe registry that contains all the ECS
netqueueThe sparse array of network entities
positionThe sparse array of position entities
lobbyIdThe sparse array of lobby id entities
netIdToClientIdThe sparse array of net id to client id entities

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