-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFirstNexusStatesDefiner.gd
More file actions
47 lines (45 loc) · 1.74 KB
/
FirstNexusStatesDefiner.gd
File metadata and controls
47 lines (45 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
extends StatesDefiner
@onready var Player :CharacterBody2D = get_tree().get_nodes_in_group("Player")[0]
func set_visible_objects() -> void:
Player = get_tree().get_nodes_in_group("Player")[0]
match StatesDefiner.state:
"first_room":
AudioServer.set_bus_effect_enabled(1, 0, true)
visible_objects = [$"../House"]
Player.z_index = $"../House".z_index + 1
"bedroom":
AudioServer.set_bus_effect_enabled(1, 0, true)
visible_objects = [$"../HouseRoom2", $"../HouseRoom3"]
Player.z_index = $"../HouseRoom3".z_index + 1
"kitchen":
AudioServer.set_bus_effect_enabled(1, 0, true)
visible_objects = [$"../HouseRoom2"]
Player.z_index = $"../HouseRoom2".z_index + 1
"living_room":
AudioServer.set_bus_effect_enabled(1, 0, true)
visible_objects = [$"../HouseRoom4"]
Player.z_index = $"../HouseRoom4".z_index + 1
"exit_hall":
AudioServer.set_bus_effect_enabled(1, 0, true)
visible_objects = [$"../HouseRoom4", $"../HouseExit"]
Player.z_index = $"../HouseExit".z_index + 1
"outside":
AudioServer.set_bus_effect_enabled(1, 0, false)
visible_objects = [$"../HouseOutside",
$"../Transition",
$"../TransitionToCycles",
$"../HouseForestTransitionOutside",
$"../HouseForestTransitionOutside2",]
Player.z_index = $"../HouseOutside".z_index + 1
"transition_to_forest":
AudioServer.set_bus_effect_enabled(1, 0, false)
visible_objects = [$"../Transition",
$"../HouseOutside",]
Player.z_index = $"../Transition".z_index + 1
"transition_to_cycles":
AudioServer.set_bus_effect_enabled(1, 0, false)
visible_objects = [$"../TransitionToCycles",
$"../HouseOutside",
$"../HouseForestTransitionOutside",
$"../HouseForestTransitionOutside2",]
Player.z_index = $"../TransitionToCycles".z_index + 1