add rain sound + add time to screen

This commit is contained in:
2026-04-09 14:21:16 +02:00
parent ecaa3704d7
commit 65294c7011
32 changed files with 383 additions and 234 deletions

View File

@@ -2,12 +2,21 @@ class_name EnvironmentConfig
extends Resource
@export_group("Day")
@export var start_time: float = 0.0 #start time of the day
@export var day_duration: float = 300.0 #Duration of a full day cycle in seconds
@export var sunrise: float = 0.25 #day_time 1.0→2.0 (night colors → morning colors)
@export var day: float = 0.45 #day_time 2.0→2.0 (stays morning/afternoon)
@export var sunset: float = 0.80 #day_time 2.0→3.0 (afternoon colors → night colors)
@export var night: float = 1.00 #day_time 3.0→3.0 (stays night)
#At wrap 1.0→0.0: day_time stays 3.0, then fades back via sunrise
@export_group("Debug")
@export var show_day_time_debug: bool = true #enable/disable debug on screen (time, normalized time and day_time
#Ambient light color tinting for each time of day
@export_group("Directional Lights and Environment")
@export var morning_color: Color = Color(1.0, 0.9, 0.8, 1.0) #Tint for morning
@export var afternoon_color: Color = Color(1.0, 0.6, 0.2, 1.0) #Tint for afternoon (sunset)
@export var afternoon_color: Color = Color(1.0, 0.663, 0.366, 1.0) #Tint for afternoon (sunset)
@export var night_color: Color = Color(0.1, 0.1, 0.3, 1.0) #Tint for night
#Sun directional light rotation for each time of day
@@ -85,6 +94,7 @@ extends Resource
@export_group("Rain")
@export var rain_mode_color: Color = Color(0.5, 0.6, 0.7, 1.0) #Sky/light darkening color during rain
@export var rain_fade_time: float = 5.0 #Seconds for rain particles to fade in/out
@export var rain_audio_volume_db: float = -10.0 #Target rain loop volume in decibels
@export var puddle_form_time: float = 15.0 #Seconds for puddles to fully form
@export var puddle_dry_time: float = 20.0 #Seconds for puddles to fully dry after rain stops
@@ -104,7 +114,7 @@ extends Resource
@export var lightning_scale_max: float = 3.0 #Maximum random scale of lightning sprite
@export var lightning_texture: String = "res://core/daynight/lighting_albedo.png" # Lightning bolt texture path
@export var weather_event_interval: float = 8.0 #Base interval between weather events
#thunder sound is configured on daynight node
@export var thunder_audio_volume_db: float = 0.0 #Target thunder volume in decibels
#God rays spawned after rain or at morning
@export_group("God Rays")