aboutsummaryrefslogtreecommitdiff
path: root/animation_system.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-05 13:44:23 +1000
committerquou <quou@disroot.org>2023-05-05 13:44:23 +1000
commitfb104368dd33b66e0575dcc0327cbae7046a4e1e (patch)
tree67a1a66182aa8417b8fbb431576528c28f4a5ab8 /animation_system.c
parent280552fa4750b5dac9243782f9c0a7e0b7eea6f8 (diff)
Add killing enemies.
Diffstat (limited to 'animation_system.c')
-rw-r--r--animation_system.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/animation_system.c b/animation_system.c
index 22317ac..8411e64 100644
--- a/animation_system.c
+++ b/animation_system.c
@@ -23,6 +23,11 @@ void animation_system(World* world) {
}
if (animated->frame >= animation->frame_count) {
+ if (bits & ctype_destroy_on_anim_done) {
+ destroy_entity(world, i);
+ continue;
+ }
+
animated->frame = 0;
animated->timer = 0;
}