tec::FPSController
#include <fps-controller.hpp>
Inherits from tec::Controller
Public Functions
| Name | |
|---|---|
| FPSController(const eid entity_id) | |
| virtual | ~FPSController() =default |
| void | Handle(const KeyboardEvent & data, const GameState & state) |
| void | Handle(const MouseBtnEvent & data, const GameState & state) |
| void | Handle(const MouseMoveEvent & data, const GameState & state) |
| virtual void | Update(double delta, GameState & state, EventList & commands) override |
| virtual proto::ClientCommands | GetClientCommands() override |
| virtual void | ApplyClientCommands(proto::ClientCommands proto_client_commands) override |
Public Attributes
| Name | |
|---|---|
| bool | forward |
| bool | backward |
| bool | right_strafe |
| bool | left_strafe |
| double | current_delta |
| bool | mouse_look |
| std::unique_ptr< Orientation > | orientation |
| bool | KEY_A_FIRST |
| bool | KEY_W_FIRST |
| bool | KEY_W_DOWN |
| bool | KEY_A_DOWN |
| bool | KEY_S_DOWN |
| bool | KEY_D_DOWN |
Additional inherited members
Public Functions inherited from tec::Controller
| Name | |
|---|---|
| Controller(eid entity_id) | |
| virtual | ~Controller() =default |
| virtual void | SetFocus(bool keyboard, bool mouse) called to indicate focus has been restored to controller |
| virtual void | ClearFocus(bool keyboard, bool mouse) called to indicate focus has been captured from controller |
Public Attributes inherited from tec::Controller
| Name | |
|---|---|
| eid | entity_id |
| bool | keyboard_focus |
| bool | mouse_focus |
Public Functions Documentation
function FPSController
inline FPSController(
const eid entity_id
)
function ~FPSController
virtual ~FPSController() =default
function Handle
void Handle(
const KeyboardEvent & data,
const GameState & state
)
function Handle
void Handle(
const MouseBtnEvent & data,
const GameState & state
)
function Handle
void Handle(
const MouseMoveEvent & data,
const GameState & state
)
function Update
virtual void Update(
double delta,
GameState & state,
EventList & commands
) override
Reimplements: tec::Controller::Update
function GetClientCommands
virtual proto::ClientCommands GetClientCommands() override
Reimplements: tec::Controller::GetClientCommands
function ApplyClientCommands
virtual void ApplyClientCommands(
proto::ClientCommands proto_client_commands
) override
Reimplements: tec::Controller::ApplyClientCommands
Public Attributes Documentation
variable forward
bool forward {false};
variable backward
bool backward {false};
variable right_strafe
bool right_strafe {false};
variable left_strafe
bool left_strafe {false};
variable current_delta
double current_delta {0.0};
variable mouse_look
bool mouse_look {false};
variable orientation
std::unique_ptr< Orientation > orientation;
variable KEY_A_FIRST
bool KEY_A_FIRST {false};
variable KEY_W_FIRST
bool KEY_W_FIRST {false};
variable KEY_W_DOWN
bool KEY_W_DOWN {false};
variable KEY_A_DOWN
bool KEY_A_DOWN {false};
variable KEY_S_DOWN
bool KEY_S_DOWN {false};
variable KEY_D_DOWN
bool KEY_D_DOWN {false};
Updated on 2022-07-24 at 19:27:35 +0000