Files
gamedev-the-steward/demo/src/CaveEntrance.gd
T
admin 4463e524aa style: apply gdformat formatting across the entire project
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).
2026-07-05 23:06:23 +02:00

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)