#pragma once #include "GameObject.hpp" #include "GameObjectTypeTag.hpp" #define GLFW_INCLUDE_NONE #include #include #include struct PlayerKeyBinds { int keyLeft = GLFW_KEY_A; int keyRight = GLFW_KEY_D; int keyJump = GLFW_KEY_SPACE; int keyAttack = GLFW_KEY_J; bool pressedLeft = 0; bool pressedRight = 0; bool pressedJump = 0; bool pressedAttack = 0; std::span GetKeyArray(); std::span GetKeyStatusArray(); }; class Player : public GameObject { public: std::vector boundKeyboards; PlayerKeyBinds keybinds; public: using GameObject::GameObject; virtual Tags::GameObjectType GetTypeTag() const override { return Tags::GOT_Player; } virtual void Awaken() override; virtual void Resleep() override; virtual void Update() override; void HandleKeyInput(int key, int action); };