diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-16 13:33:26 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-16 13:33:26 -0400 |
commit | dad2425e2c686f188c2d8e9e58ac62d87d073bde (patch) | |
tree | 4f4ba4d8768afa662bd855a920fe20d9579681b9 /include/components.hpp | |
parent | 326cd4e5fdc396c5c34ac9371b53d2838ea9ee4d (diff) |
prototyped new detect
Diffstat (limited to 'include/components.hpp')
-rw-r--r-- | include/components.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/components.hpp b/include/components.hpp index 34a1906..5a638de 100644 --- a/include/components.hpp +++ b/include/components.hpp @@ -60,6 +60,20 @@ struct Physics { }; /** + * @struct Health + * @brief Gives and entity health and stuff. + */ +struct Health { + /** + * Constructor that sets the variables, with 0 health as default. + */ + Health(int h = 0, int m = 0) : health(h), maxHealth(m) {} + + int health; + int maxHealth; +}; + +/** * @struct Solid * @brief Allows an entity to collide with other objects. * When an entity has this component it can collide with the world and other objects. |