2024-01-20 12:17:43 +00:00
|
|
|
class_name DecisionTextManager extends Node
|
|
|
|
|
2024-04-10 19:19:04 +01:00
|
|
|
@export var inter : InteractionManager
|
|
|
|
@export var array_obj : Array[Node3D]
|
2024-01-20 12:17:43 +00:00
|
|
|
@export var textArray : Array[TextInteraction]
|
|
|
|
@export var colliderArray : Array[StaticBody3D]
|
|
|
|
@export var animator : AnimationPlayer
|
2024-04-05 10:52:30 +01:00
|
|
|
@export var uiParent : Control
|
2024-01-20 12:17:43 +00:00
|
|
|
|
|
|
|
func _ready():
|
2024-04-10 19:19:04 +01:00
|
|
|
if (GlobalVariables.using_gl): for i in array_obj: i.visible = false
|
2024-01-20 12:17:43 +00:00
|
|
|
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")
|
2024-04-10 19:19:04 +01:00
|
|
|
if (GlobalVariables.using_gl): for i in array_obj: i.visible = true
|
|
|
|
inter.fs_dec = false
|
2024-01-20 12:17:43 +00:00
|
|
|
else:
|
|
|
|
for i in range(colliderArray.size()):
|
|
|
|
colliderArray[i].collision_layer = 0
|
|
|
|
colliderArray[i].collision_mask = 0
|
|
|
|
animator.play("hide text")
|
2024-04-05 10:52:30 +01:00
|
|
|
uiParent.visible = false
|
2024-04-10 19:19:04 +01:00
|
|
|
if (GlobalVariables.using_gl): for i in array_obj: i.visible = false
|
|
|
|
inter.fs_dec = false
|