Gesundheit - SamToorchi/Godot-Zombi-Game GitHub Wiki
entity.gd
const MAXHEALTH = 2
var health = MAXHEALTH
func damage_loop():
else:
if TYPE == "ENEMY" and health <= 0:
queue_free()
for area in $hitbox.get_overlapping_areas():
if hitstun == 0 and body.get("DAMAGE") != null and body.get("TYPE") != TYPE:
#health wird um 1 verringert
health -= body.get("DAMAGE")