mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-24 16:44:20 +00:00
13 lines
262 B
GDScript3
13 lines
262 B
GDScript3
|
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()
|