diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-09-02 10:13:25 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-09-02 10:13:57 +0200 |
commit | c298eb988874bc2cf3adb39c2532419ec76a24bc (patch) | |
tree | 76e888a3f9c5c789cb0579e490901584c1357897 /game/entity.h | |
parent | 8af1284654a4a5d454a559eca371bf0ac3c79786 (diff) |
all imp sprites + train problems solved
Diffstat (limited to 'game/entity.h')
-rw-r--r-- | game/entity.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/game/entity.h b/game/entity.h index 50c7acc..8f61cee 100644 --- a/game/entity.h +++ b/game/entity.h @@ -13,6 +13,9 @@ class EntityInfo { public: EntityInfo() { spritebounds = vec2 { 16*6, 16 }; } + enum Class { inf, cav, ran, sie, bld }; + Class ent_class; + std::string name; int id; @@ -27,21 +30,23 @@ class EntityInfo { int unit; std::vector<int> abilities; std::vector<int> build; - std::vector<int> train; + std::vector<int> train_id; + std::vector<Class> train_class; std::vector<float> prod { 0, 0 }; std::vector<float> cost { 0, 0 }; std::vector<int> adjacent; - + float defence_bonus { 0 }; int upgrade { -1 }; - enum Class { inf, cav, ran, sie, bld }; - Class ent_class; - vec2 spritebounds; }; +namespace EntityClass { + int from_string(std::string str); +} + class Entity { public: Entity(int x, int y, EntityInfo *info, int owner) @@ -58,6 +63,7 @@ class Entity { bool done = false; int moved; EntityInfo *info; + int fights { 0 }; int owner; }; |