aboutsummaryrefslogtreecommitdiff
path: root/game/entity.h
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-08-19 18:46:51 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-08-19 18:46:51 +0200
commita8bcacc95045102e67f2feabbdddf79535837554 (patch)
tree5781dd4cb2fe66b67deab84ff4641b7e21b9c174 /game/entity.h
forgot to make repo until now
Diffstat (limited to 'game/entity.h')
-rw-r--r--game/entity.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/game/entity.h b/game/entity.h
new file mode 100644
index 0000000..1fcf026
--- /dev/null
+++ b/game/entity.h
@@ -0,0 +1,43 @@
+#ifndef ENTITIES_H
+#define ENTITIES_H
+
+#include <vector>
+#include <string>
+
+#include "../umath/vec2.h"
+
+class Ability {
+ public:
+ Ability();
+};
+
+class EntityInfo {
+ public:
+ EntityInfo() { spritebounds = vec2 { 16*6, 16 }; }
+
+ std::string name;
+
+ float hp;
+ float attack;
+ float defence;
+ int range;
+ float sight;
+ int move;
+ std::vector<Ability> abilities;
+
+ vec2 spritebounds;
+};
+
+class Entity {
+ public:
+ Entity(int x, int y, EntityInfo &info, int owner)
+ : x(x), y(y), info(info), owner(owner) {}
+
+ int x, y;
+ bool done = false;
+ EntityInfo &info;
+
+ int owner;
+};
+
+#endif \ No newline at end of file