Entities now have health values associated

This commit is contained in:
2016-07-16 20:06:52 +10:00
parent 6c3ef63a65
commit 0d5725eb97
2 changed files with 39 additions and 6 deletions
+8
View File
@@ -34,6 +34,12 @@ typedef struct EntityAnim
f32 currDuration;
} EntityAnim;
typedef struct EntityStats
{
f32 maxHealth;
f32 health;
} EntityStats;
typedef struct Entity
{
v2 pos; // Position
@@ -50,6 +56,8 @@ typedef struct Entity
EntityAnim anim[16];
i32 freeAnimIndex;
i32 currAnimIndex;
EntityStats *stats;
} Entity;
INTERNAL inline v4 getEntityScreenRect(Entity entity)