Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::server::InputComponent Struct Reference

Component to handle network input for server entities. More...

#include <InputComponent.hpp>

Collaboration diagram for rtp::ecs::components::server::InputComponent:

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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ InputBits

Enumerator
MoveUp 
MoveDown 
MoveLeft 
MoveRight 
Shoot 
Reload 
DebugPowerup 

Definition at line 28 of file InputComponent.hpp.

Member Data Documentation

◆ chargeTime

float rtp::ecs::components::server::InputComponent::chargeTime = 0.0f

Accumulated charge time for shoot.

Definition at line 40 of file InputComponent.hpp.

◆ lastMask

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().

◆ lastProcessedTick

uint32_t rtp::ecs::components::server::InputComponent::lastProcessedTick = 0

Last processed server tick for input.

Definition at line 39 of file InputComponent.hpp.

◆ mask

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().


The documentation for this struct was generated from the following file: