mirror of
https://github.com/zoriya/ForecastingVillage.git
synced 2026-06-02 18:50:54 +00:00
added functionnal health component
This commit is contained in:
@@ -8,14 +8,21 @@
|
||||
#ifndef MY_RPG_HEALTH_COMPONENT_H
|
||||
#define MY_RPG_HEALTH_COMPONENT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "component.h"
|
||||
|
||||
struct health_component
|
||||
{
|
||||
gc_component base;
|
||||
unsigned int health;
|
||||
int health;
|
||||
bool dead;
|
||||
};
|
||||
|
||||
void add_health(struct health_component *this, gc_engine *engine, \
|
||||
unsigned int amount);
|
||||
void rem_health(struct health_component *this, gc_engine *engine, \
|
||||
unsigned int amount);
|
||||
|
||||
extern const struct health_component health_component;
|
||||
|
||||
#endif //MY_RPG_HEALTH_COMPONENT_H
|
||||
|
||||
Reference in New Issue
Block a user