extends CharacterBody2D

var camera
var bar_progress = 0

func _ready() -> void:
	camera = get_node("/root/Game/Camera2D")
func _physics_process(delta: float) -> void:
	# Add the gravity.
	pass

func _on_collect(DropsBase):
	
	$CauldronBar.change_texture(bar_progress,3)
	bar_progress += 1
	if bar_progress == 3:
		await $CauldronBar.ignite_cauldrons()
		get_tree().call_group("enemies", "_die")
		camera.shake(0.3,0.8)
		bar_progress = 0
		$CauldronBar.reset_texture()
