Skip to content

Gesundheit

SamToorchi edited this page Feb 10, 2020 · 1 revision
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")

Clone this wiki locally