1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-25 00:54:19 +00:00
swear-jar/game/action_timer.gd

12 lines
262 B
GDScript

extends Timer
class_name ActionTimer
## A timer which keeps repeating as long as an action is held.
## The name of the action to check.
@export var action: String
func _physics_process(_delta):
if is_stopped() and Input.is_action_pressed(action):
start()