Lobby level gates trigger areas

This commit is contained in:
2026-09-01 21:22:16 +03:00
parent 271be0b26b
commit 76d4fee33c
11 changed files with 105 additions and 146 deletions
+55
View File
@@ -3,9 +3,42 @@
[ext_resource type="PackedScene" uid="uid://bbfvwolhomilp" path="res://tscn_s/torch.tscn" id="1_w7uyf"]
[ext_resource type="PackedScene" uid="uid://bd56iuttyiypv" path="res://tscn_s/BarrelSimple.tscn" id="2_3o0md"]
[ext_resource type="PackedScene" uid="uid://dctmlh4hnuux1" path="res://Assets/Lobby_underground.glb" id="2_w7uyf"]
[ext_resource type="Script" uid="uid://cwbf7jfkr8j10" path="res://Assets/lobby_underground.gd" id="4_73452"]
[ext_resource type="Script" uid="uid://dn77mjyxllgl6" path="res://levels/to_the_bear_level.gd" id="5_6j2sa"]
[ext_resource type="Script" uid="uid://cgwliuslwfmbk" path="res://levels/to_the_arena_level.gd" id="6_jmi3x"]
[sub_resource type="Environment" id="Environment_lobby"]
[sub_resource type="Animation" id="Animation_w7uyf"]
resource_name = "Gate_opening"
length = 7.5
tracks/0/type = "position_3d"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Lobby_underground/Locked_grid")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 0.033333335, 1, 0.032444477, 0, 0, 0.06666667, 1, -0.033060133, 0, 0, 0.10934577, 1, 0.032444477, 0, 0, 0.14267911, 1, -0.033060133, 0, 0, 0.17731747, 1, 0.032444477, 0, 0, 0.2106508, 1, -0.033060133, 0, 0, 0.24085623, 1, 0.032444477, 0, 0, 0.27418956, 1, -0.033060133, 0, 0, 0.29700676, 1, 0.032444477, 0, 0, 0.3303401, 1, -0.033060133, 0, 0, 0.36350083, 1, 0.032444477, 0, 0, 0.39683416, 1, -0.033060133, 0, 0, 0.42408428, 1, 0.032444477, 0, 0, 0.4574176, 1, -0.033060133, 0, 0, 0.48153976, 1, 0, 0, 0, 0.5148731, 1, 0.032444477, 0, 0, 0.54402214, 1, 0.032444477, 0, 0, 0.54820645, 1, -0.033060133, 0, 0, 0.57735544, 1, -0.033060133, 0, 0, 0.5908855, 1, 0.032444477, 0, 0, 0.60017264, 1, 0.032444477, 0, 0, 0.6242189, 1, -0.033060133, 0, 0, 0.633506, 1, -0.033060133, 0, 0, 0.6588572, 1, 0.032444477, 0, 0, 0.6666667, 1, 0.032444477, 0, 0, 0.6921905, 1, -0.033060133, 0, 0, 0.70000005, 1, -0.033060133, 0, 0, 0.72725016, 1, 0.032444477, 0, 0, 0.75179356, 1, 0, 0, 0, 0.76058346, 1, -0.033060133, 0, 0, 0.7851269, 1, 0.032444477, 0, 0, 0.8184602, 1, -0.033060133, 0, 0, 0.86113936, 1, 0.032444477, 0, 0, 0.8944727, 1, -0.033060133, 0, 0, 0.929111, 1, 0.032444477, 0, 0, 0.9624443, 1, -0.033060133, 0, 0, 0.9926498, 1, 0.032444477, 0, 0, 1.0259831, 1, -0.033060133, 0, 0, 1.0488003, 1, 0.032444477, 0, 0, 1.0821337, 1, -0.033060133, 0, 0, 1.1152945, 1, 0.032444477, 0, 0, 1.1486278, 1, -0.033060133, 0, 0, 1.1758778, 1, 0.032444477, 0, 0, 1.2092111, 1, -0.033060133, 0, 0, 1.2333333, 1, 0, 0, 0, 1.2666667, 1, 0.032444477, 0, 0, 1.2958157, 1, 0.032444477, 0, 0, 1.3, 1, -0.033060133, 0, 0, 1.329149, 1, -0.033060133, 0, 0, 1.342679, 1, 0.032444477, 0, 0, 1.3519661, 1, 0.032444477, 0, 0, 1.3760124, 1, -0.033060133, 0, 0, 1.3852996, 1, -0.033060133, 0, 0, 1.4106507, 1, 0.032444477, 0, 0, 1.4184602, 1, 0.032444477, 0, 0, 1.443984, 1, -0.033060133, 0, 0, 1.4517937, 1, -0.033060133, 0, 0, 1.4790437, 1, 0.032444477, 0, 0, 1.512377, 1, -0.033060133, 0, 0, 1.6, 1, 0, 0, 0, 7.4666667, 1, 0, 6.938447, 0)
[sub_resource type="Animation" id="Animation_73452"]
length = 0.001
tracks/0/type = "position_3d"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Lobby_underground/Locked_grid")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0)
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6j2sa"]
_data = {
&"Gate_opening": SubResource("Animation_w7uyf"),
&"RESET": SubResource("Animation_73452")
}
[sub_resource type="BoxShape3D" id="BoxShape3D_73452"]
size = Vector3(4.1274414, 6.53479, 6.9958496)
[node name="lobby_level" type="Node3D" unique_id=1511255302]
[node name="Lights" type="Node3D" parent="." unique_id=562527333]
@@ -207,8 +240,30 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.1928787, 0.11255789, 2.8063
[node name="Lobby_underground" parent="." unique_id=1313381882 instance=ExtResource("2_w7uyf")]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0, 0, 0)
script = ExtResource("4_73452")
[node name="Plane" parent="Lobby_underground" index="1" unique_id=1962555538]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2352347, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="Lobby_underground" unique_id=2070502042]
root_node = NodePath("../..")
libraries/ = SubResource("AnimationLibrary_6j2sa")
[node name="to_the_bear_level" type="Area3D" parent="." unique_id=267572930]
collision_mask = 3
script = ExtResource("5_6j2sa")
[node name="CollisionShape3D" type="CollisionShape3D" parent="to_the_bear_level" unique_id=2080871641]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.561888, 2.767395, 0.59606934)
shape = SubResource("BoxShape3D_73452")
[node name="to_the_arena_level" type="Area3D" parent="." unique_id=293174522]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -2.7537346, 0, -1.2036956e-07)
collision_mask = 3
script = ExtResource("6_jmi3x")
[node name="CollisionShape3D" type="CollisionShape3D" parent="to_the_arena_level" unique_id=409491377]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.561888, 2.767395, 0.59606934)
shape = SubResource("BoxShape3D_73452")
[editable path="Lobby_underground"]
+1
View File
@@ -83,6 +83,7 @@ func _on_matador_killed() -> void:
if _alive > 0 or _resolved:
return
if _wave >= DP.f("mat_wave_size"):
DP.set_value("gate_unlocked_bear", true)
_resolved = true
all_defeated.emit()
else:
+13
View File
@@ -0,0 +1,13 @@
extends Area3D
func _ready() -> void:
# Connect the signal via code
body_entered.connect(_on_body_entered)
func _on_body_entered(body: Node3D) -> void:
print("Something entered the trigger: ", body.name)
# Check if the colliding object is the player
if body.is_in_group("player"):
#CHANGE TO BEAR LEVEL
print("go to arena level")
+1
View File
@@ -0,0 +1 @@
uid://cgwliuslwfmbk
+13
View File
@@ -0,0 +1,13 @@
extends Area3D
func _ready() -> void:
# Connect the signal via code
body_entered.connect(_on_body_entered)
func _on_body_entered(body: Node3D) -> void:
print("Something entered the trigger: ", body.name)
# Check if the colliding object is the player
if body.is_in_group("player"):
#CHANGE TO BEAR LEVEL
print("go to bear level")
+1
View File
@@ -0,0 +1 @@
uid://dn77mjyxllgl6