1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-22 07:44:17 +00:00
This commit is contained in:
Matteo Balugani 2023-10-02 16:33:00 +02:00
commit f25524b2b1
3 changed files with 4 additions and 3 deletions

View file

@ -29,7 +29,8 @@ func _on_body_entered(body: Node2D):
if collectible and collectible.type in collecting_types:
collected_count += 1
collectible.collect()
$sound_absorb.play()
if sound_absorb:
sound_absorb.play()
emit_signal("collected", body)
if collected_count >= collecting_amount:
emit_signal("goal")

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://c4ew8x4gch275"]
[gd_scene load_steps=23 format=3 uid="uid://c4ew8x4gch275"]
[ext_resource type="Script" path="res://converters/converter.gd" id="1_f5plk"]
[ext_resource type="Texture2D" uid="uid://chc8wqc1pclbk" path="res://converters/gold_to_gem/gold_converter_back.png" id="2_icys1"]

View file

@ -35,7 +35,7 @@ texture = ExtResource("3_6jejy")
shader = ExtResource("5_v6ppl")
[node name="Collectible" parent="." instance=ExtResource("4_idoeu")]
type = &"Silver"
type = &"Gem"
[node name="Valuable" parent="." instance=ExtResource("5_7bd6c")]
value = 10