Moving files pre-refactor
This commit is contained in:
12
cutscene/item/CutsceneItem.gd
Normal file
12
cutscene/item/CutsceneItem.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
class_name CutsceneItem extends Node
|
||||
|
||||
var cutscene:Cutscene = null
|
||||
|
||||
func start() -> void:
|
||||
# This method should be overridden by subclasses
|
||||
pass
|
||||
|
||||
func done() -> void:
|
||||
if !cutscene:
|
||||
return
|
||||
cutscene.nextItem()
|
1
cutscene/item/CutsceneItem.gd.uid
Normal file
1
cutscene/item/CutsceneItem.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dbjcrhunrugyb
|
24
cutscene/item/CutsceneText.gd
Normal file
24
cutscene/item/CutsceneText.gd
Normal file
@@ -0,0 +1,24 @@
|
||||
class_name CutsceneText extends CutsceneItem
|
||||
|
||||
@export_multiline var interactTexts:Array[String] = []
|
||||
var nextTextIndex:int = 0
|
||||
|
||||
func _enter_tree() -> void:
|
||||
pass
|
||||
|
||||
func _exit_tree() -> void:
|
||||
UI.TEXTBOX.textboxClosing.disconnect(onTextboxClosing)
|
||||
|
||||
func start() -> void:
|
||||
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()
|
1
cutscene/item/CutsceneText.gd.uid
Normal file
1
cutscene/item/CutsceneText.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://8updtj1mctra
|
Reference in New Issue
Block a user