Removed some redundant debug information

This commit is contained in:
theskywinds 2025-05-18 16:51:07 +02:00
parent 39e1f5c0d2
commit 01f55afb04
3 changed files with 7 additions and 5 deletions

View File

@ -4,11 +4,9 @@ signal crystal_picked_up
func _ready():
add_to_group("crystals")
print("ready")
func _on_body_entered(body: Node2D) -> void:
if body.name == "player":
print("Player entered")
emit_signal("crystal_picked_up")
queue_free()
else:

View File

@ -4,7 +4,7 @@
[ext_resource type="PackedScene" uid="uid://c1xy5bf2p6vmh" path="res://player/smallPlayer/player.tscn" id="2_r1egm"]
[ext_resource type="PackedScene" uid="uid://darxbklsgh23m" path="res://collectables/crystal/collectableCrystal.tscn" id="3_56573"]
[ext_resource type="PackedScene" uid="uid://chpqjpcexhd3t" path="res://rock/Rock.tscn" id="4_1l7e8"]
[ext_resource type="Script" uid="uid://c3qi2ffmxsl8i" path="res://levelOne/exit_zone.gd" id="5_r1egm"]
[ext_resource type="Script" path="res://levelOne/exit_zone.gd" id="5_r1egm"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_s5r4n"]
size = Vector2(67, 25)

View File

@ -1,13 +1,17 @@
extends ProgressBar
var addAmount: float
func _ready() -> void:
await get_tree().process_frame
var crystals = get_tree().get_nodes_in_group("crystals")
print("Got " + str(crystals.size()) + " crystals")
addAmount = crystals.size() / 100.0
print("Pulled " + str(crystals.size()) + " crystals from scene")
for crystal in crystals:
print("Connecting crystal: " + crystal.name)
crystal.connect("crystal_picked_up", Callable(self, "collect"))
func collect():
value += 2.0
print("Collected crystal")
value += 5.0