Preserve approved pixel tower prototype as development baseline

This commit is contained in:
Codex
2026-09-09 07:51:16 +09:00
commit 423fd6dd2e
915 changed files with 95193 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
extends SimulationKernel
signal phase_changed(phase: Phase)
enum Phase {
MORNING,
DAY,
EVENING,
NIGHT,
}
var _phase := Phase.MORNING
func _ready() -> void:
_phase = get_phase()
super._ready()
func reset(start_day := 1, start_hour := 6, start_minute := 0) -> void:
super.reset(start_day, start_hour, start_minute)
_phase = get_phase()
func advance_one_minute() -> void:
super.advance_one_minute()
var next_phase := get_phase()
if next_phase != _phase:
_phase = next_phase
phase_changed.emit(_phase)
func get_phase() -> Phase:
var hour := get_hour()
if hour >= 6 and hour < 10:
return Phase.MORNING
if hour >= 10 and hour < 16:
return Phase.DAY
if hour >= 16 and hour < 20:
return Phase.EVENING
return Phase.NIGHT
func formatted_time() -> String:
return "Day %d %02d:%02d" % [day, get_hour(), get_minute()]