Fixed last push
This commit is contained in:
parent
879a4279a5
commit
26532f0755
18
player/smallPlayer/menus/Score bar.tscn
Normal file
18
player/smallPlayer/menus/Score bar.tscn
Normal file
|
@ -0,0 +1,18 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cnvs3iophpe3n"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://biv656fho5bpy" path="res://player/smallPlayer/menus/progress_bar.gd" id="1_qy0dt"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="ProgressBar" type="ProgressBar" parent="CanvasLayer"]
|
||||
offset_right = 367.0
|
||||
offset_bottom = 27.0
|
||||
script = ExtResource("1_qy0dt")
|
13
player/smallPlayer/menus/progress_bar.gd
Normal file
13
player/smallPlayer/menus/progress_bar.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends ProgressBar
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
await get_tree().process_frame
|
||||
var crystals = get_tree().get_nodes_in_group("crystals")
|
||||
print("Got " + str(crystals.size()) + " crystals")
|
||||
for crystal in crystals:
|
||||
print("Connecting crystal: " + crystal.name)
|
||||
crystal.connect("crystal_picked_up", Callable(self, "collect"))
|
||||
|
||||
func collect():
|
||||
value += 2.0
|
1
player/smallPlayer/menus/progress_bar.gd.uid
Normal file
1
player/smallPlayer/menus/progress_bar.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://biv656fho5bpy
|
Loading…
Reference in New Issue
Block a user