mirror of
https://github.com/thecatontheceiling/buckshotroulette-decomp.git
synced 2024-11-25 15:07:21 +00:00
27 lines
413 B
GDScript
27 lines
413 B
GDScript
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
|