gae_wild_jam/scripts/slime.gd

20 lines
328 B
GDScript

extends EnemyBase
func _ready() -> void:
super()
speed = 15.0
max_hp = 10
hp = max_hp
func _process(delta: float) -> void:
super._process(delta)
if is_dying or is_hurt:
return
_chase_witch()
func _on_area_2d_body_entered(body: Node2D) -> void:
if is_dying:
return
if body == player:
take_damage(player.damage)