Reorganizing

This commit is contained in:
Maurane
2026-01-26 18:04:39 +01:00
parent b3d31dffa9
commit b7086caa11
11 changed files with 250 additions and 222 deletions
+38 -2
View File
@@ -4,11 +4,13 @@ extends TextureRect
signal reveal_done
signal hide_done
signal dialogue_finished
func _ready():
randomize()
# --- Création du bruit ---
#Noise setup
var noise := FastNoiseLite.new()
noise.noise_type = FastNoiseLite.TYPE_SIMPLEX
noise.frequency = 20.0
@@ -23,6 +25,7 @@ func _ready():
mat.set_shader_parameter("noise_tex", noise_tex)
#Revealing supervisor in a noise spray
func reveal_spray():
mat.set_shader_parameter("progress", 0.0)
@@ -36,6 +39,7 @@ func reveal_spray():
reveal_done.emit()
#hiding supervisor in a hiding spray
func hide_spray():
mat.set_shader_parameter("progress", 1.0)
@@ -49,6 +53,38 @@ func hide_spray():
hide_done.emit()
#Progressing the reveal/hide
func set_progress(value: float):
mat.set_shader_parameter("progress", value)
#Supervisor dialogue, mainly between floors
func dialogue(dialogue_resource, dialogue_start):
#Showing the supervisor
show()
reveal_spray()
await reveal_done
#Dialogue
Globals.start_balloon.emit("screening", dialogue_resource, dialogue_start)
await DialogueManager.dialogue_ended
#Hiding the supervisor
hide_spray()
await hide_done
hide()
dialogue_finished.emit()
#Change emotions following dialogue tags
func _change_emotion(dialogue_line) -> void:
var line_tag = dialogue_line.tags
print("Supervisor marker value: " + str(Patient.marker[0]))
if line_tag.is_empty() == false:
var new_emotion = line_tag[0]
texture = Patient.emotions[String(new_emotion)]
print("Emotion changed to ", new_emotion)