chain levels with spaghetti

This commit is contained in:
Taevas 2025-02-23 00:46:23 +01:00
parent 7a18c4f8c6
commit 6a59b54c11
10 changed files with 465 additions and 15 deletions

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://cpm3laywhlbq5"]
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://levels/base/material.tres" id="1_48h5f"]
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://graphics/unhappy_material.tres" id="1_48h5f"]
[ext_resource type="AudioStream" uid="uid://b0cl5v6q1ocbv" path="res://sounds/ring1.ogg" id="2_2so43"]
[ext_resource type="AudioStream" uid="uid://cvvs74ep5d4wt" path="res://sounds/ring2.ogg" id="3_lkqw0"]
@ -10,12 +10,14 @@ script/source = "extends CSGTorus3D
var happy_material = preload(\"res://graphics/happy_material.tres\")
var collected = false
signal collect_signal
func _on_area_3d_body_entered(body: Node3D) -> void:
if collected == false and body.name == \"Sphere\":
self.material = happy_material
collected = true
$AudioStreamPlayer.play()
collect_signal.emit()
"
[sub_resource type="CylinderShape3D" id="CylinderShape3D_tgirv"]