Consistent SYSTEMS

This commit is contained in:
2025-05-25 14:37:30 -05:00
parent 48f3e57a44
commit 470fd62e2f
34 changed files with 65 additions and 106 deletions

View File

@@ -0,0 +1,37 @@
class_name PauseSystem extends Node
enum PauseType {
# Completely unpaused
NOT_PAUSED,
# Fully paused, with no exceptions to anything
FULLY_PAUSED,
# Specific entities are paused
ENTITY_PAUSED,
# All entities are paused unless specified
CUTSCENE_PAUSED
};
var pauseType:PauseType = PauseType.NOT_PAUSED;
var entities:Array[Entity] = [];
var playerPaused:bool = false;
func getPauseState() -> PauseType:
if isPlayerPaused():
return PauseType.FULLY_PAUSED;
return pauseType;
func pause(
pauseType:PauseType,
entities:Array = [],
) -> void:
self.pauseType = pauseType;
self.entities = entities;
func unpause() -> void:
self.pauseType = PauseType.NOT_PAUSED;
func isPlayerPaused() -> bool:
return playerPaused;
func playerPauseToggle() -> void:
playerPaused = !playerPaused;