diff options
author | zlago | 2024-10-26 20:21:15 +0200 |
---|---|---|
committer | zlago | 2024-10-26 20:22:08 +0200 |
commit | ee316a07cdfb01e52694edef2cc998e672e2885b (patch) | |
tree | 99ad4155267146e8b727905de539ddcaf1d0bcca /src/entity.h | |
parent | d44d411e0eb3800ed883374b29c2863e1a863735 (diff) |
redo the damage system
Diffstat (limited to 'src/entity.h')
-rw-r--r-- | src/entity.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/entity.h b/src/entity.h index 33aca68..038b62a 100644 --- a/src/entity.h +++ b/src/entity.h @@ -28,9 +28,13 @@ enum factions { FACTION_ENEMY, }; +struct damage { + int damage, iframes; +}; + struct entity { int (*update)(struct entity *self); - int (*hurt)(struct entity *self, int damage); + int (*hurt)(struct entity *self, struct damage damage); int (*draw)(struct entity *self, int camx, int camy); void (*free)(struct entity *self); int x, y; // unsigned results in a bunch of weird edge cases |