extends Node2D

func _process(_delta: float) -> void:
	$Points.text = str(State.points)

func _on_button_button_down():
	State.blower_up = true
	$PointsTimer.paused = false
	$AnimationPlayer.current_animation = "blower_up"

func _on_button_button_up():
	State.blower_up = false
	$PointsTimer.paused = true
	$AnimationPlayer.current_animation = "blower_down"

func _on_points_timer_timeout():
	if State.blowing:
		State.points += 1
