My Project
|
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 ®istry, 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 ®istry, Sparse_array< component::cposition_t > &position, uint16_t playerId, int lobbyId) |
Create a Bullet object. More... | |
The Shoot System class, it handles all packets related to a mouse click by the user, generating a bullet.
Entity System::ShootSystem::createBullet | ( | Registry & | registry, |
Sparse_array< component::cposition_t > & | position, | ||
uint16_t | playerId, | ||
int | lobbyId | ||
) |
Create a Bullet object.
registry | The registry that contains all the ECS |
position | The sparse array of position entities |
playerId | The id of the player who shot |
lobbyId | The id of the lobby |
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.
registry | The registry that contains all the ECS |
netqueue | The sparse array of network entities |
position | The sparse array of position entities |
lobbyId | The sparse array of lobby id entities |
netIdToClientId | The sparse array of net id to client id entities |