Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
BulletCleanupSystem.hpp
Go to the documentation of this file.
1
8#ifndef RTYPE_BULLET_CLEANUP_SYSTEM_HPP_
9 #define RTYPE_BULLET_CLEANUP_SYSTEM_HPP_
10
11 #include "RType/ECS/ISystem.hpp"
12 #include "RType/ECS/Registry.hpp"
13
18
19 #include "Systems/RoomSystem.hpp"
20 #include "Systems/NetworkSyncSystem.hpp"
21
22namespace rtp::server {
28 public:
36 RoomSystem& roomSystem,
37 NetworkSyncSystem& networkSync);
38
43 void update(float dt) override;
44
45 private:
51 void despawn(const ecs::Entity& entity, uint32_t roomId);
52
53 private:
58 float _minX = -200.0f;
59 float _maxX = 1800.0f;
60 };
61}
62
63#endif /* !RTYPE_BULLET_CLEANUP_SYSTEM_HPP_ */
Interface for ECS systems.
Represents an entity in the ECS (Entity-Component-System) architecture.
Definition Entity.hpp:63
Abstract base class for all ECS systems.
Definition ISystem.hpp:57
Despawns bullets that leave the play area.
float _minX
Left boundary for bullet despawn.
void despawn(const ecs::Entity &entity, uint32_t roomId)
Despawn an entity and notify players in the room.
RoomSystem & _roomSystem
Reference to the RoomSystem.
void update(float dt) override
Update system logic for one frame.
float _maxX
Right boundary for bullet despawn.
NetworkSyncSystem & _networkSync
Reference to the NetworkSyncSystem.
ecs::Registry & _registry
Reference to the ECS registry.
System to handle network-related operations on the server side.
System to handle room-related operations on the server side.
File : GameManager.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias-josue....