4463e524aa
Auto-format all GDScript files using gdformat from gdtoolkit. This is a baseline formatting pass to ensure consistent style: - Normalizes indentation and spacing - Wraps long lines to 100 characters - Removes trailing whitespace - Standardizes blank lines between functions 68 files reformatted, 8 files left unchanged (3rd-party addon files with parse errors excluded).
23 lines
699 B
GDScript
23 lines
699 B
GDScript
extends Area3D
|
|
|
|
|
|
func _ready() -> void:
|
|
body_entered.connect(_on_body_entered)
|
|
body_exited.connect(_on_body_exited)
|
|
|
|
|
|
func _on_body_entered(body: Node3D) -> void:
|
|
if body.name == "Player":
|
|
var env: WorldEnvironment = get_node_or_null("../../Environment/WorldEnvironment")
|
|
if env:
|
|
var tween: Tween = get_tree().create_tween()
|
|
tween.tween_property(env.environment, "ambient_light_energy", .1, .33)
|
|
|
|
|
|
func _on_body_exited(body: Node3D) -> void:
|
|
if body.name == "Player":
|
|
var env: WorldEnvironment = get_node_or_null("../../Environment/WorldEnvironment")
|
|
if env:
|
|
var tween: Tween = get_tree().create_tween()
|
|
tween.tween_property(env.environment, "ambient_light_energy", 1., .33)
|