Removed some redundant debug information
This commit is contained in:
parent
39e1f5c0d2
commit
01f55afb04
|
@ -4,11 +4,9 @@ signal crystal_picked_up
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
add_to_group("crystals")
|
add_to_group("crystals")
|
||||||
print("ready")
|
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if body.name == "player":
|
if body.name == "player":
|
||||||
print("Player entered")
|
|
||||||
emit_signal("crystal_picked_up")
|
emit_signal("crystal_picked_up")
|
||||||
queue_free()
|
queue_free()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -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://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://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="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"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_s5r4n"]
|
||||||
size = Vector2(67, 25)
|
size = Vector2(67, 25)
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
extends ProgressBar
|
extends ProgressBar
|
||||||
|
|
||||||
|
var addAmount: float
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
var crystals = get_tree().get_nodes_in_group("crystals")
|
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:
|
for crystal in crystals:
|
||||||
print("Connecting crystal: " + crystal.name)
|
print("Connecting crystal: " + crystal.name)
|
||||||
crystal.connect("crystal_picked_up", Callable(self, "collect"))
|
crystal.connect("crystal_picked_up", Callable(self, "collect"))
|
||||||
|
|
||||||
func collect():
|
func collect():
|
||||||
value += 2.0
|
print("Collected crystal")
|
||||||
|
value += 5.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user