feat: added Enemies are now invincible while stunned
This commit is contained in:
parent
6ffdf9f5a4
commit
9d220a1cb8
|
@ -123,6 +123,8 @@ RigidBody* EnemyGetRigidBody(Enemy* self) {
|
|||
}
|
||||
|
||||
int EnemyDamage(Enemy* self, DamageEventData* data) {
|
||||
if(self->stun_time > 0.f)
|
||||
return 0;
|
||||
self->health -= data->damageAmount;
|
||||
LOG_INFO("Damage received");
|
||||
if(self->health <= 0) {
|
||||
|
|
Loading…
Reference in a new issue