2024-12-23 01:29:31 +00:00
|
|
|
extends Node
|
|
|
|
|
2024-12-27 07:56:45 +00:00
|
|
|
|
|
|
|
func get_player() -> MainPlayer:
|
|
|
|
return get_node_or_null("/root/Main/MainPlayer") as MainPlayer
|
|
|
|
|
|
|
|
|
|
|
|
func get_ground_loader() -> GroundLoader:
|
|
|
|
return get_node_or_null("/root/Main/GroundLoader") as GroundLoader
|
|
|
|
|
|
|
|
|
2024-12-23 01:29:31 +00:00
|
|
|
func pop_notification(msg: String, number := 1) -> void:
|
|
|
|
var notification_node = get_node_or_null("/root/Main/UILayer/Notification")
|
|
|
|
if notification_node:
|
|
|
|
notification_node.show_notification(msg, number)
|
|
|
|
else:
|
2024-12-27 07:56:45 +00:00
|
|
|
printerr("Notification node not found")
|
|
|
|
|
|
|
|
|
|
|
|
func pop_dialog(
|
|
|
|
character: String,
|
|
|
|
content: String,
|
|
|
|
character_color := "orange",
|
|
|
|
content_color := "white",
|
|
|
|
duration := 2.5
|
|
|
|
) -> void:
|
|
|
|
var dialog_node = get_node_or_null("/root/Main/UILayer/Dialog")
|
|
|
|
if dialog_node:
|
|
|
|
dialog_node.append_dialog(character, content, character_color, content_color, duration)
|
|
|
|
else:
|
|
|
|
printerr("Dialog node not found")
|
|
|
|
|
|
|
|
|
|
|
|
func pop_note(note: String, note_color := "white", duration := 2.5) -> void:
|
|
|
|
var dialog_node = get_node_or_null("/root/Main/UILayer/Dialog")
|
|
|
|
if dialog_node:
|
|
|
|
dialog_node.append_note(note, note_color, duration)
|
|
|
|
else:
|
|
|
|
printerr("Dialog node not found")
|