My Project
|
The SpawnEnemy System class, it handles all packets related to the spawn of an enemy in the game. More...
#include <SpawnEnemySystem.hpp>
Public Member Functions | |
SpawnEnemySystem () | |
Construct a new Spawn Enemy System object. | |
void | operator() (Registry ®istry, Sparse_array< component::cnetwork_queue_t > &netqueue, Sparse_array< component::cposition_t > &position, Sparse_array< component::ctype_t > &type, Sparse_array< component::ctimer_t > &timer, Sparse_array< component::clobbies_status_t > &lobbiesStatus, Sparse_array< component::cmap_t > &map, Sparse_array< component::chealth_t > &health) |
The main handler for the SpawnEnemy System. More... | |
Entity | createEnemyFromSpec (Registry ®istry, int enemyType, int lobby_id, std::size_t line, std::size_t map_size) |
Create an Enemy object from spec list load from config file. More... | |
The SpawnEnemy System class, it handles all packets related to the spawn of an enemy in the game.
Entity System::SpawnEnemySystem::createEnemyFromSpec | ( | Registry & | registry, |
int | enemyType, | ||
int | lobby_id, | ||
std::size_t | line, | ||
std::size_t | map_size | ||
) |
Create an Enemy object from spec list load from config file.
registry | The registry that contains all the ECS |
enemyType | The id of the enemy in the config list of spec |
lobby_id | The id of the lobby where spawn the entity |
line | The line number of the entity position in the spawn enemy map |
map_size | The number of line of the spawn enemy map |
void System::SpawnEnemySystem::operator() | ( | Registry & | registry, |
Sparse_array< component::cnetwork_queue_t > & | netqueue, | ||
Sparse_array< component::cposition_t > & | position, | ||
Sparse_array< component::ctype_t > & | type, | ||
Sparse_array< component::ctimer_t > & | timer, | ||
Sparse_array< component::clobbies_status_t > & | lobbiesStatus, | ||
Sparse_array< component::cmap_t > & | map, | ||
Sparse_array< component::chealth_t > & | health | ||
) |
The main handler for the SpawnEnemy System.
registry | The registry that contains all the ECS |
netqueue | The sparse array of network entities |
position | The sparse array of position entities |
type | The sparse array of type entities |
timer | The sparse array of timer entities |
lobbiesStatus | The sparse array of lobbies status entities |
map | The sparse array of map entities |