goodnight_jellybean/godot/AtticAmberLight.gd

24 lines
432 B
GDScript

extends OmniLight3D
var active = false
func _ready():
var _err = GlobalCursorState.connect("set_camera_zone",Callable(self,"zone"))
visible = false
func zone(where: String):
if where != "camera_attic_inner":
$AnimationPlayer.stop()
active = false
visible = false
return
active = true
func _on_AnimationTree_motion_status(value):
if not active:
return
if value:
return
$AnimationPlayer.play("light_flicker")