Initial Commit

This commit is contained in:
June
2026-03-24 22:00:03 -07:00
parent bf9620bbb6
commit 5533b95cff
73 changed files with 1647 additions and 293 deletions

28
Scripts/Logic/cNight.gd Normal file
View File

@@ -0,0 +1,28 @@
class_name cNight
extends Node
signal hour_changed(new_hour)
signal night_completed
@export var seconds_per_hour := 10.0
@export var start_hour := 12
@export var end_hour := 6
var current_hour := start_hour
var hour_timer := 0.0
func _process(delta: float) -> void:
hour_timer += delta
if hour_timer >= seconds_per_hour:
hour_timer = 0.0
_advance_hour()
func _advance_hour() -> void:
if current_hour == 12:
current_hour = 1
else:
current_hour += 1
emit_signal("hour_changed", current_hour)
if current_hour >= end_hour:
emit_signal("night_completed")