#pragma once #include "GameObject.hpp" #include "GameObjectTags.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 PlayerVisual { public: }; class Player : public GameObject { public: std::vector boundKeyboards; PlayerKeyBinds keybinds; PlayerVisual visuals; int mId; public: Player(GameWorld* world, int id); virtual Tags::GameObjectType GetTypeTag() const override { return Tags::GOT_Player; } virtual void Awaken() override; virtual void Resleep() override; virtual void Update() override; int GetId() const { return mId; } void HandleKeyInput(int key, int action); // File is designated by player ID bool LoadFromFile(); bool SaveToFile(); };