mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-24 08:34:19 +00:00
12 lines
262 B
GDScript
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()
|