Destroys dead entities and tells every player with DestroyEntity.
More...
#include <ServerDeathSystem.hpp>
|
| | ServerDeathSystem (Server &server, const std::unordered_map< std::uint32_t, std::size_t > &players, const std::uint32_t &serverTick) |
| | Creates the system.
|
| |
|
void | onStart (rtk::ecs::Registry &) override |
| | Does nothing.
|
| |
| void | update (rtk::ecs::Registry ®, float) override |
| | Broadcasts and destroys every entity tagged with Dead.
|
| |
|
void | onStop (rtk::ecs::Registry &) override |
| | Does nothing.
|
| |
Destroys dead entities and tells every player with DestroyEntity.
◆ ServerDeathSystem()
| rtype::server::ServerDeathSystem::ServerDeathSystem |
( |
Server & | server, |
|
|
const std::unordered_map< std::uint32_t, std::size_t > & | players, |
|
|
const std::uint32_t & | serverTick ) |
|
inline |
Creates the system.
- Parameters
-
| server | Server used to send DestroyEntity. |
| players | Connected players, keyed by connection id. |
| serverTick | Current server tick. |
◆ update()
| void rtype::server::ServerDeathSystem::update |
( |
rtk::ecs::Registry & | reg, |
|
|
float | ) |
|
inlineoverride |
Broadcasts and destroys every entity tagged with Dead.
- Parameters
-
| reg | Registry holding the entities. |