25 lines
573 B
GDScript
25 lines
573 B
GDScript
extends Node
|
|
|
|
var savedPos = Vector2.ZERO
|
|
|
|
func boolToNumb(val, offset=0):
|
|
return float(val) + offset
|
|
|
|
func getCurrentActions():
|
|
var actionsList = InputMap.get_actions()
|
|
var validActions = {}
|
|
for action in actionsList:
|
|
if not "ui_" in action:
|
|
if Input.is_action_just_pressed(action):
|
|
validActions[action] = 1
|
|
elif Input.is_action_just_released(action):
|
|
validActions[action] = 2
|
|
return validActions
|
|
|
|
func getRecordingFrameCount(recording):
|
|
var frameSort = []
|
|
for frame in recording:
|
|
frameSort.append(frame)
|
|
|
|
frameSort.sort()
|
|
return frameSort[-1]
|