Singelton patch

This commit is contained in:
2025-05-05 22:21:51 -05:00
parent 43487bb448
commit 631365aa38
46 changed files with 78 additions and 174 deletions

View File

@@ -1,5 +1,4 @@
class_name CutsceneEvent
const Systems = preload("res://scripts/System/Systems.gd")
var started:bool = false;
var cutscene = null;
@@ -24,9 +23,3 @@ func reset() -> void:
func getCutscene():
return cutscene
func getCutsceneSystem():
return cutscene.cutsceneSystem;
func getSystems() -> Systems:
return getCutsceneSystem().get_node("..") as Systems;

View File

@@ -1,5 +1,4 @@
class_name CutscenePauseEvent extends "res://scripts/Cutscene/CutsceneEvent.gd"
const PauseSystem = preload("res://scripts/System/PauseSystem.gd")
var pauseType:PauseSystem.PauseType;
var pauseEntities:Array = [];
@@ -13,4 +12,4 @@ func _init(
self.pauseEntities = entities;
func start() -> void:
getSystems().PAUSE.pause(self.pauseType, self.pauseEntities);
PAUSE.pause(self.pauseType, self.pauseEntities);

View File

@@ -9,7 +9,7 @@ func _init(
self.text = text;
func start() -> void:
getSystems().VN.getTextbox().setText(self.text);
VN.getTextbox().setText(self.text);
func isDone() -> bool:
return getSystems().VN.getTextbox().isClosed;
return VN.getTextbox().isClosed;