From 36874a535a3d5f7f2955f33e34aa1a4768b6fec1 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sat, 4 Jun 2022 03:17:22 -0600 Subject: added hud for snake size and grow progress --- src/ui/hud/progress_bars/scripts/growth_progress.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/ui/hud/progress_bars/scripts/growth_progress.gd (limited to 'src/ui/hud/progress_bars/scripts') diff --git a/src/ui/hud/progress_bars/scripts/growth_progress.gd b/src/ui/hud/progress_bars/scripts/growth_progress.gd new file mode 100644 index 0000000..a9d455c --- /dev/null +++ b/src/ui/hud/progress_bars/scripts/growth_progress.gd @@ -0,0 +1,10 @@ +extends TextureProgress + + +func _ready(): + Event.connect("snake_growth_progress", self, "_on_snake_growth_progress") + max_value = Global.POINTS_TO_GROW + + +func _on_snake_growth_progress(progress: int) -> void: + value = progress -- cgit v1.2.3-70-g09d2