class_name Enemy extends NPC enum questTypes { NONE, FEW_KILL, MANY_KILL, ONE_KILL } signal enemy_died(npcDifficulty: npcDifficulties, questType: questTypes) @export var questType: questTypes = questTypes.NONE func _init() -> void: self.npcDifficulty = npcDifficulties.NORMAL self.npcTier = npcTiers.I func _ready() -> void: # add to enemies add_to_group("enemies") # set health _random_mod_health() # set health bar %Healthbar.max_value = maxHealth %Healthbar.value = maxHealth func _process(_delta: float) -> void: %Healthbar.value = maxHealth - damageTaken if damageTaken >= maxHealth: # send signal that I died to be counted, etc. enemy_died.emit(self.npcDifficulty, self.questType) # delete node self.queue_free()