Bubble-Blower/scripts/game.gd
Marvin Dalheimer 0ab65e1df6
Init
2025-01-25 21:40:19 +01:00

18 lines
431 B
GDScript

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