adding health component workin and game display support

This commit is contained in:
Clément Le Bihan
2020-04-22 19:50:27 +02:00
parent 1f37be2e5a
commit 2334450698
10 changed files with 57 additions and 11 deletions
+3 -1
View File
@@ -10,7 +10,9 @@
typedef enum display_type
{
SELECT_TILE_DISPLAY,
XP_DISPLAY
XP_DISPLAY,
HEALTH_DISPLAY,
HEALTH_DISPLAY_ENNEMY
} display_type_enum;
struct game_display
+1
View File
@@ -14,6 +14,7 @@
struct health_component
{
gc_component base;
int health_max;
int health;
bool dead;
};
+3 -3
View File
@@ -5,8 +5,8 @@
** xp_component
*/
#ifndef MY_RPG_HEALTH_COMPONENT_H
#define MY_RPG_HEALTH_COMPONENT_H
#ifndef MY_RPG_XP_COMPONENT_H
#define MY_RPG_XP_COMPONENT_H
#include <stdbool.h>
#include "component.h"
@@ -25,4 +25,4 @@ unsigned int amount);
extern const struct xp_component xp_component;
#endif //MY_RPG_HEALTH_COMPONENT_H
#endif //MY_RPG_XP_COMPONENT_H