add rain sound

This commit is contained in:
Overside srl
2026-02-24 18:55:34 +01:00
parent 392fd1254f
commit 0ca80ae65b
8 changed files with 95 additions and 28 deletions

View File

@@ -41,11 +41,9 @@ signal meteor_shower_ended()
var _spawn_timer: float = 0.0
var _next_spawn_time: float = 0.0
var _meteor_timer: float = 0.0
var _meteor_spawn_accumulator: float = 0.0
var _meteor_shower_elapsed: float = 0.0
var _active_stars: Array[Dictionary] = []
var _star_mesh: MeshInstance3D
var _star_material: ShaderMaterial
var _is_night: bool = false
@@ -185,10 +183,10 @@ func _get_random_fall_direction() -> Vector3:
var base_dir := Vector3(-0.5, -0.8, -0.3).normalized()
var variance := deg_to_rad(spawn_direction_variance)
var rotation := Basis(Vector3.UP, randf() * TAU)
rotation = rotation.rotated(Vector3.RIGHT, randf_range(-variance, variance))
var curr_rotation := Basis(Vector3.UP, randf() * TAU)
curr_rotation = curr_rotation.rotated(Vector3.RIGHT, randf_range(-variance, variance))
return (rotation * base_dir).normalized()
return (curr_rotation * base_dir).normalized()
func _create_star_trail(position: Vector3, direction: Vector3, is_meteor: bool = false) -> MeshInstance3D: