goodnight_jellybean/godot/AtticAmberLight.gd

24 lines
422 B
GDScript

extends OmniLight
var active = false
func _ready():
var _err = GlobalCursorState.connect("set_camera_zone", 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")