add slider to manage day cycle manually

This commit is contained in:
2026-03-25 19:43:44 +01:00
parent a07cfa19a4
commit f3c3ab0a19
4 changed files with 40 additions and 13 deletions

View File

@@ -20,6 +20,7 @@ var current_time: float = 0.0
func _ready() -> void:
current_time = start_time
update_time(current_time)
UIEvents.set_day_time.connect(_on_set_day_time)
func _process(delta: float) -> void:
if paused or day_duration <= 0.0:
@@ -43,3 +44,6 @@ func set_time(t: float) -> void:
func update_time(currtime: float) -> void:
emit_signal("time_changed", currtime)
func _on_set_day_time(value: float) -> void:
set_time(value)