summaryrefslogtreecommitdiff
path: root/src/ui/hud/progress_bars/scripts/growth_progress.gd
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-06-04 03:17:22 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-06-04 03:17:22 -0600
commit36874a535a3d5f7f2955f33e34aa1a4768b6fec1 (patch)
tree8f4eaa57d5e82d962719a8a399cfc210ced672e6 /src/ui/hud/progress_bars/scripts/growth_progress.gd
parentf922fe4669080d1633e0a345a3f8981867c9e841 (diff)
added hud for snake size and grow progress
Diffstat (limited to 'src/ui/hud/progress_bars/scripts/growth_progress.gd')
-rw-r--r--src/ui/hud/progress_bars/scripts/growth_progress.gd10
1 files changed, 10 insertions, 0 deletions
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