30 lines
485 B
GDScript
30 lines
485 B
GDScript
class_name PauseSingleton extends Node
|
|
|
|
var cutscenePaused:bool = false
|
|
|
|
func cutscenePause() -> void:
|
|
cutscenePaused = true
|
|
|
|
func cutsceneResume() -> void:
|
|
cutscenePaused = false
|
|
|
|
func isMovementPaused() -> bool:
|
|
if cutscenePaused:
|
|
return true
|
|
|
|
if !UI.TEXTBOX.isClosed:
|
|
return true
|
|
|
|
if UI.PAUSE.isOpen():
|
|
return true
|
|
|
|
if OVERWORLD.isMapChanging():
|
|
return true
|
|
|
|
return false
|
|
|
|
func menuPause() -> void:
|
|
if UI.PAUSE.isOpen():
|
|
UI.PAUSE.close()
|
|
else:
|
|
UI.PAUSE.open() |