Adding simple dialog system

This commit is contained in:
2026-02-13 11:41:39 -06:00
parent 2d27e4254e
commit a66c39e9f8
9 changed files with 307 additions and 38 deletions
+17 -5
View File
@@ -1,13 +1,25 @@
extends Node3D
@export var day_length := 120.0 # seconds for full rotation
@export var start_light_angle := -90.0
var end_light_angle = start_light_angle + 360.0
var start_radians = start_light_angle * PI / 180
var time := 0.0
@export var day_length := 120.0 # seconds for full rotation
@export var start_light_angle := -90.0
@export var show_spawn_dialog := true
@export_multiline var spawn_dialog_text := "Welcome to Promiscuity.\n\nPress E to close this message."
@export var spawn_dialog_auto_close_seconds := 4.0
var end_light_angle = start_light_angle + 360.0
var start_radians = start_light_angle * PI / 180
var time := 0.0
@onready var sun := $DirectionalLight3D
func _ready() -> void:
if show_spawn_dialog and DialogSystem and DialogSystem.has_method("show_text"):
await get_tree().process_frame
DialogSystem.show_text(spawn_dialog_text)
if spawn_dialog_auto_close_seconds > 0.0:
await get_tree().create_timer(spawn_dialog_auto_close_seconds).timeout
if DialogSystem and DialogSystem.has_method("close_if_text"):
DialogSystem.close_if_text(spawn_dialog_text)
func _process(delta):
time = fmod((time + delta), day_length)
var t = time / day_length