-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDecisionTextManager.gd
31 lines (28 loc) · 1.02 KB
/
DecisionTextManager.gd
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
class_name DecisionTextManager extends Node
@export var inter : InteractionManager
@export var array_obj : Array[Node3D]
@export var textArray : Array[TextInteraction]
@export var colliderArray : Array[StaticBody3D]
@export var animator : AnimationPlayer
@export var uiParent : Control
func _ready():
if (GlobalVariables.using_gl): for i in array_obj: i.visible = false
for i in range(colliderArray.size()):
colliderArray[i].collision_layer = 0
colliderArray[i].collision_mask = 0
func SetUI(state : bool):
if (state):
for i in range(colliderArray.size()):
colliderArray[i].collision_layer = 1
colliderArray[i].collision_mask = 1
animator.play("show text")
if (GlobalVariables.using_gl): for i in array_obj: i.visible = true
inter.fs_dec = false
else:
for i in range(colliderArray.size()):
colliderArray[i].collision_layer = 0
colliderArray[i].collision_mask = 0
animator.play("hide text")
uiParent.visible = false
if (GlobalVariables.using_gl): for i in array_obj: i.visible = false
inter.fs_dec = false