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

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 &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. More...
 
Entity 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. More...
 

Detailed Description

The SpawnEnemy System class, it handles all packets related to the spawn of an enemy in the game.

Member Function Documentation

◆ createEnemyFromSpec()

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.

Parameters
registryThe registry that contains all the ECS
enemyTypeThe id of the enemy in the config list of spec
lobby_idThe id of the lobby where spawn the entity
lineThe line number of the entity position in the spawn enemy map
map_sizeThe number of line of the spawn enemy map
Returns
Entity The entity of the enemy

◆ operator()()

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.

Parameters
registryThe registry that contains all the ECS
netqueueThe sparse array of network entities
positionThe sparse array of position entities
typeThe sparse array of type entities
timerThe sparse array of timer entities
lobbiesStatusThe sparse array of lobbies status entities
mapThe sparse array of map entities

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