X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FPlayerController.hpp;fp=src%2Fui%2FPlayerController.hpp;h=8d9e5a37247c3ca0622b70dd11cdb5cc0218a4ad;hb=b066e776622f96e906600a0c4a08de392bd03676;hp=0000000000000000000000000000000000000000;hpb=e1209ec25c4cc91e13889876106f56bd51aa96e2;p=blank.git diff --git a/src/ui/PlayerController.hpp b/src/ui/PlayerController.hpp new file mode 100644 index 0000000..8d9e5a3 --- /dev/null +++ b/src/ui/PlayerController.hpp @@ -0,0 +1,35 @@ +#ifndef BLANK_UI_PLAYERCONTROLLER_HPP_ +#define BLANK_UI_PLAYERCONTROLLER_HPP_ + +#include + + +namespace blank { + +struct PlayerController { + + /// set desired direction of movement + /// the magnitude (clamped to [0..1]) can be used to attenuate target velocity + virtual void SetMovement(const glm::vec3 &) = 0; + /// turn the controlled entity's head by given pitch and yaw deltas + virtual void TurnHead(float pitch, float yaw) = 0; + + /// start doing primary action + /// what exactly this means depends on the active item + virtual void StartPrimaryAction() = 0; + /// stop doing primary action + virtual void StopPrimaryAction() = 0; + // etc + virtual void StartSecondaryAction() = 0; + virtual void StopSecondaryAction() = 0; + virtual void StartTertiaryAction() = 0; + virtual void StopTertiaryAction() = 0; + + /// set the item at given inventory slot as active + virtual void SelectInventory(int) = 0; + +}; + +} + +#endif