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,7 +1,5 @@
class_name OverworldEntity extends CharacterBody3D
const PauseSystem = preload("res://scripts/System/PauseSystem.gd")
enum Direction {
NORTH,
EAST,
@@ -33,9 +31,6 @@ func _updateMaterial():
return
material.set_shader_parameter("direction", direction)
func getSystems() -> Systems:
return get_tree().current_scene.get_node("Systems") as Systems;
func getDirectionVector() -> Vector3:
match direction:
Direction.NORTH:
@@ -70,19 +65,18 @@ func updateOverworldLogic(delta) -> void:
pass
func isPaused() -> bool:
var pause = getSystems().PAUSE;
var ps = pause.getPauseState();
var ps = PAUSE.getPauseState();
if ps == PauseSystem.PauseType.NOT_PAUSED:
return false;
elif ps == PauseSystem.PauseType.FULLY_PAUSED:
return true;
elif ps == PauseSystem.PauseType.ENTITY_PAUSED:
if pause.entities.find(self) != -1:
if PAUSE.entities.find(self) != -1:
return true;
return false
elif ps == PauseSystem.PauseType.CUTSCENE_PAUSED:
if pause.entities.find(self) != -1:
if PAUSE.entities.find(self) != -1:
return false;
return true;
return false;