aboutsummaryrefslogtreecommitdiff
path: root/source/Player.hpp
diff options
context:
space:
mode:
authorhnOsmium0001 <[email protected]>2022-04-25 20:22:07 -0700
committerhnOsmium0001 <[email protected]>2022-04-25 20:22:07 -0700
commitf54370de7e4214cb7813d26b1a39a8f6e42b7b56 (patch)
tree20913b4099b77af933fcd2ebb4e73f53b366ad8f /source/Player.hpp
parentc8ebee643f23c34ff57f69f8dfcf1903b59ea9d1 (diff)
Initial work on rendering sprites to screen
Diffstat (limited to 'source/Player.hpp')
-rw-r--r--source/Player.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/Player.hpp b/source/Player.hpp
index 4ae4f80..d003a25 100644
--- a/source/Player.hpp
+++ b/source/Player.hpp
@@ -1,7 +1,9 @@
#pragma once
#include "GameObject.hpp"
-#include "GameObjectTags.hpp"
+#include "Material.hpp"
+#include "RcPtr.hpp"
+#include "Sprite.hpp"
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
@@ -24,26 +26,25 @@ struct PlayerKeyBinds {
std::span<bool> GetKeyStatusArray();
};
-class PlayerVisual {
-public:
-};
-
class Player : public GameObject {
public:
std::vector<GLFWkeyboard*> boundKeyboards;
PlayerKeyBinds keybinds;
- PlayerVisual visuals;
+ Sprite sprite;
+ RenderObject renderObject;
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;
+ Material* GetMaterial() const;
+ void SetMaterial(Material* material);
+ virtual std::span<const RenderObject> GetRenderObjects() const override;
+
int GetId() const { return mId; }
void HandleKeyInput(int key, int action);