extends Enemy

@onready var sprite : AnimatedSprite2D = $AnimatedSprite2D

func _sprite_anim():
	if target_node.position.x > position.x:
		if current_charge > 0.1:
			sprite.play("attack_right")
		else:
			sprite.play("run_right")
	else:
		if current_charge > 0.1:
			sprite.play("attack_left")
		else:
			sprite.play("run_left")
