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

The Move System class, it handles all packets related to movement by the clients. More...

#include <MoveSystem.hpp>

Public Member Functions

 MoveSystem ()
 Construct a new Move System object.
 
void operator() (Registry &registry, Sparse_array< component::cnetwork_queue_t > &netqueue, Sparse_array< component::cdirection_t > &direction, Sparse_array< component::cposition_t > &position, Sparse_array< component::cvelocity_t > &velocity, Sparse_array< component::ctimer_t > &timer, Sparse_array< component::clobby_id_t > &LobbyId, Sparse_array< component::clobbies_status_t > &lobbiesStatus)
 The main handler for the Move System. More...
 
void sendKillEntityPacket (Registry &registry, uint16_t id, Sparse_array< component::cnetwork_queue_t > &netqueue)
 Function to add send packet to send network queue. More...
 
 MoveSystem ()
 Construct a new Move System object.
 
void operator() (Registry &registry, Sparse_array< component::cdirection_t > &direction, Sparse_array< component::cposition_t > &position, Sparse_array< component::cvelocity_t > &velocity, Sparse_array< component::ctimer_t > &timer)
 Function that will be automaticaly called while the client is working (on loop) More...
 

Detailed Description

The Move System class, it handles all packets related to movement by the clients.

MoveSystem class that handles the movement of the entities.

Member Function Documentation

◆ operator()() [1/2]

void System::MoveSystem::operator() ( Registry registry,
Sparse_array< component::cdirection_t > &  direction,
Sparse_array< component::cposition_t > &  position,
Sparse_array< component::cvelocity_t > &  velocity,
Sparse_array< component::ctimer_t > &  timer 
)

Function that will be automaticaly called while the client is working (on loop)

Parameters
registryThe registry of the client
directionThe sparse array of direction entities
positionThe sparse array of position entities
velocityThe sparse array of velocity entities
timerThe sparse array of timer entities

◆ operator()() [2/2]

void System::MoveSystem::operator() ( Registry registry,
Sparse_array< component::cnetwork_queue_t > &  netqueue,
Sparse_array< component::cdirection_t > &  direction,
Sparse_array< component::cposition_t > &  position,
Sparse_array< component::cvelocity_t > &  velocity,
Sparse_array< component::ctimer_t > &  timer,
Sparse_array< component::clobby_id_t > &  LobbyId,
Sparse_array< component::clobbies_status_t > &  lobbiesStatus 
)

The main handler for the Move System.

Parameters
registryThe registry of the server
netqueueThe sparse array of network entities
directionThe sparse array of direction entities
positionThe sparse array of position entities
velocityThe sparse array of velocity entities
timerThe sparse array of timer entities
lobbyIdThe sparse array of lobby id entities
lobbiesStatusThe sparse array of lobbies status entities

◆ sendKillEntityPacket()

void System::MoveSystem::sendKillEntityPacket ( Registry registry,
uint16_t  id,
Sparse_array< component::cnetwork_queue_t > &  netqueue 
)

Function to add send packet to send network queue.

Parameters
registryThe registry of the server
idThe id of the killed entity
netqueueThe sparse array of network entities

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