Godot 4.5.1

This commit is contained in:
2025-12-14 22:43:11 +10:00
parent 5805ac2260
commit 4dd1ce64f5
433 changed files with 2922 additions and 585 deletions

View File

@@ -4,21 +4,21 @@ class_name CutsceneText extends CutsceneItem
var nextTextIndex:int = 0
func _enter_tree() -> void:
pass
pass
func _exit_tree() -> void:
UI.TEXTBOX.textboxClosing.disconnect(onTextboxClosing)
UI.TEXTBOX.textboxClosing.disconnect(onTextboxClosing)
func start() -> void:
nextTextIndex = 0
UI.TEXTBOX.setText(interactTexts[nextTextIndex])
UI.TEXTBOX.textboxClosing.connect(onTextboxClosing)
nextTextIndex = 0
UI.TEXTBOX.setText(interactTexts[nextTextIndex])
UI.TEXTBOX.textboxClosing.connect(onTextboxClosing)
func onTextboxClosing() -> void:
nextTextIndex += 1
if nextTextIndex < interactTexts.size():
UI.TEXTBOX.setText(interactTexts[nextTextIndex])
else:
UI.TEXTBOX.textboxClosing.disconnect(onTextboxClosing)
UI.TEXTBOX.setText("")
done()
nextTextIndex += 1
if nextTextIndex < interactTexts.size():
UI.TEXTBOX.setText(interactTexts[nextTextIndex])
else:
UI.TEXTBOX.textboxClosing.disconnect(onTextboxClosing)
UI.TEXTBOX.setText("")
done()