8#ifndef RTYPE_PLAYER_SHOOT_SYSTEM_HPP_
9 #define RTYPE_PLAYER_SHOOT_SYSTEM_HPP_
27 #include "Systems/NetworkSyncSystem.hpp"
29 #include <unordered_map>
56 void update(
float dt)
override;
68 bool doubleFire =
false);
81 bool doubleFire =
false);
Interface for ECS systems.
Represents an entity in the ECS (Entity-Component-System) architecture.
Abstract base class for all ECS systems.
System to handle network-related operations on the server side.
Spawns bullets from player input on the server.
ecs::Registry & _registry
Reference to the entity registry.
float _bulletSpeed
Speed of the spawned bullets.
void sendAmmoUpdate(uint32_t netId, const ecs::components::Ammo &ammo)
Send an ammo update to the client for a specific network ID.
float _chargedBulletSpeed
Speed of the charged bullets.
void spawnDebugPowerup(const Vec2f &position, uint32_t roomId, int dropRoll)
Spawn a debug powerup for testing (triggered by P key)
RoomSystem & _roomSystem
Reference to the RoomSystem.
NetworkSyncSystem & _networkSync
Reference to the NetworkSyncSystem.
void spawnChargedBullet(ecs::Entity owner, const ecs::components::Transform &tf, const ecs::components::RoomId &roomId, float chargeRatio, bool doubleFire=false)
Spawn a charged bullet based on the player's transform and room ID.
std::unordered_map< uint32_t, float > _beamTickTimers
void spawnBullet(ecs::Entity owner, const ecs::components::Transform &tf, const ecs::components::RoomId &roomId, bool doubleFire=false)
Spawn a bullet entity based on the player's transform and room ID.
void update(float dt) override
Update player shoot system logic for one frame.
float _spawnOffsetX
X offset for bullet spawn position.
System to handle room-related operations on the server side.
File : GameManager.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias-josue....
Ammo tracking for weapons.
Component representing a network identifier for an entity.