goodnight_jellybean/godot/AtticAmberLight.gd

24 lines
422 B
GDScript3
Raw Permalink Normal View History

2023-01-01 02:23:56 -07:00
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")