Add new PNG assets for time and speed UI components
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class_name Counter extends RefCounted
|
||||
|
||||
var is_active: bool = false
|
||||
|
||||
var sec: float = 1
|
||||
var value: float = 0
|
||||
|
||||
|
||||
func is_reached() -> bool:
|
||||
if value >= sec:
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
|
||||
func add_delta(delta: float) -> void:
|
||||
value += delta
|
||||
|
||||
|
||||
func debug() -> void:
|
||||
print(is_active, " | ", value, " of ", sec)
|
||||
@@ -0,0 +1 @@
|
||||
uid://b3vs2tjw60yu2
|
||||
Reference in New Issue
Block a user