|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
Component to handle network input for server entities. More...
#include <InputComponent.hpp>
Public Types | |
| enum | InputBits : uint8_t { MoveUp = 1 << 0 , MoveDown = 1 << 1 , MoveLeft = 1 << 2 , MoveRight = 1 << 3 , Shoot = 1 << 4 , Reload = 1 << 5 , DebugPowerup = 1 << 6 } |
Public Attributes | |
| uint8_t | mask = 0 |
| Input mask for filtering input types. | |
| uint8_t | lastMask = 0 |
| Previous input mask for edge detection. | |
| uint32_t | lastProcessedTick = 0 |
| Last processed server tick for input. | |
| float | chargeTime = 0.0f |
| Accumulated charge time for shoot. | |
Component to handle network input for server entities.
This component is responsible for receiving and processing network input for entities on the server side. It utilizes the ServerNetwork to poll for incoming network events and manage session data.
Definition at line 27 of file InputComponent.hpp.
| enum rtp::ecs::components::server::InputComponent::InputBits : uint8_t |
| Enumerator | |
|---|---|
| MoveUp | |
| MoveDown | |
| MoveLeft | |
| MoveRight | |
| Shoot | |
| Reload | |
| DebugPowerup | |
Definition at line 28 of file InputComponent.hpp.
| float rtp::ecs::components::server::InputComponent::chargeTime = 0.0f |
Accumulated charge time for shoot.
Definition at line 40 of file InputComponent.hpp.
| uint8_t rtp::ecs::components::server::InputComponent::lastMask = 0 |
Previous input mask for edge detection.
Definition at line 38 of file InputComponent.hpp.
Referenced by rtp::server::NetworkSyncSystem::handleInput().
| uint32_t rtp::ecs::components::server::InputComponent::lastProcessedTick = 0 |
Last processed server tick for input.
Definition at line 39 of file InputComponent.hpp.
| uint8_t rtp::ecs::components::server::InputComponent::mask = 0 |
Input mask for filtering input types.
Definition at line 37 of file InputComponent.hpp.
Referenced by rtp::server::NetworkSyncSystem::handleInput().