From fb104368dd33b66e0575dcc0327cbae7046a4e1e Mon Sep 17 00:00:00 2001 From: quou Date: Fri, 5 May 2023 13:44:23 +1000 Subject: Add killing enemies. --- animation_system.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'animation_system.c') 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; } -- cgit v1.2.3-54-g00ecf