Bit more cleanup
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
extends Node
|
||||
|
||||
var currentCutscene:Cutscene = null;
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if PAUSE.getPauseState() == PAUSE.PauseType.FULLY_PAUSED:
|
||||
return;
|
||||
|
||||
if currentCutscene != null:
|
||||
currentCutscene.update(delta);
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if currentCutscene != null:
|
||||
currentCutscene.clear();
|
||||
|
||||
func setCurrentCutscene(cutscene:Cutscene) -> void:
|
||||
if currentCutscene != null:
|
||||
currentCutscene.clear();
|
||||
|
||||
currentCutscene = cutscene;
|
||||
cutscene.cutsceneSystem = self;
|
||||
currentCutscene.setupCutscene();
|
@@ -1 +1,13 @@
|
||||
class_name QuestSystem extends Node
|
||||
class_name QuestSystem extends Node
|
||||
|
||||
var quests:Array[Quest]
|
||||
|
||||
func _ready() -> void:
|
||||
_updateQuests()
|
||||
pass
|
||||
|
||||
func _updateQuests() -> void:
|
||||
quests = []
|
||||
for quest in $Quests.get_children():
|
||||
if quest is Quest:
|
||||
quests.append(quest)
|
@@ -1,25 +1,5 @@
|
||||
class_name UISystem extends Control
|
||||
|
||||
enum Layer {
|
||||
Game,
|
||||
VN,
|
||||
Test,
|
||||
Debug
|
||||
}
|
||||
|
||||
func addSubscene(subscene:Control, layer:Layer) -> void:
|
||||
subscene.originalParent.remove_child.call_deferred(subscene)
|
||||
|
||||
match layer:
|
||||
Layer.Game:
|
||||
$LayerGame.add_child.call_deferred(subscene)
|
||||
Layer.Debug:
|
||||
$LayerDebug.add_child.call_deferred(subscene)
|
||||
Layer.VN:
|
||||
$LayerVN.add_child.call_deferred(subscene)
|
||||
_:
|
||||
push_error("Invalid layer: " + str(layer))
|
||||
return
|
||||
|
||||
func removeSubscene(subscene:Control) -> void:
|
||||
subscene.get_parent().remove_child(subscene)
|
||||
func _process(delta: float) -> void:
|
||||
# This needs to always be at the end of the parent node's tree
|
||||
get_parent().move_child(self, get_parent().get_child_count() - 1)
|
||||
|
@@ -4,7 +4,7 @@ const VNTextbox = preload("res://scripts/UI/VNTextbox.gd")
|
||||
var vnTextbox:VNTextbox = null
|
||||
|
||||
func _ready() -> void:
|
||||
vnTextbox = $SubsceneUI/VNTextbox
|
||||
vnTextbox = UI.get_node("VNTextbox")
|
||||
|
||||
func getTextbox() -> VNTextbox:
|
||||
return vnTextbox
|
||||
|
Reference in New Issue
Block a user