R-Type 0.1
Loading...
Searching...
No Matches
rtk::systems::PlayerSystem Class Referencefinal

Sends the local player actions to the server every frame and triggers the shot sound. More...

#include <systems/PlayerSystem.hpp>

Inheritance diagram for rtk::systems::PlayerSystem:
[legend]

Public Member Functions

 PlayerSystem (rtk::InputState &inputState, busEvent &eventBus, rtk::factory::EntityFactory &entityFactory, rtype::client::NetworkClient &networkClient)
 Creates the system.
 
void onStart (rtk::ecs::Registry &) override
 Logs that the system is loaded.
 
void update (rtk::ecs::Registry &, float) override
 Sends an Input message and publishes a shot on button release.
 

Detailed Description

Sends the local player actions to the server every frame and triggers the shot sound.

Constructor & Destructor Documentation

◆ PlayerSystem()

rtk::systems::PlayerSystem::PlayerSystem ( rtk::InputState & inputState,
busEvent & eventBus,
rtk::factory::EntityFactory & entityFactory,
rtype::client::NetworkClient & networkClient )
inline

Creates the system.

Parameters
inputStateInput state of the frame.
eventBusBus on which PlayerShotEvent is published.
entityFactoryEntity factory of the engine.
networkClientClient used to send Input messages.