buckshotroulette-decomp/BpmLight.gd

27 lines
413 B
GDScript3
Raw Normal View History

2024-01-20 12:17:43 +00:00
class_name BpmLight extends Node
@export var animator : AnimationPlayer
var delay
var l
var looping = false
func _ready():
l = get_parent()
func BeginMainLoop():
looping = true
BeginLoop()
func Hit():
animator.play("hit")
pass
func BeginLoop():
while (looping):
Hit()
await get_tree().create_timer(delay, false).timeout
Hit()
await get_tree().create_timer(delay, false).timeout
pass
pass