24 lines
713 B
GDScript
24 lines
713 B
GDScript
class_name GameInputEvents
|
|
extends Node
|
|
|
|
static func movement_input() -> float:
|
|
var direction : float = Input.get_axis("move_left", "move_right")
|
|
return direction
|
|
|
|
static func jump_input() -> bool:
|
|
var jumpInput: bool = Input.is_action_just_pressed("move_jump")
|
|
var jumpRelesed: bool = Input.is_action_pressed("move_jump")
|
|
return jumpInput or jumpRelesed
|
|
|
|
static func crouch_input() -> bool:
|
|
var crouchInput: bool = Input.is_action_just_pressed("crouch")
|
|
return crouchInput
|
|
|
|
static func fall_input() -> bool:
|
|
var fallInput: bool = Input.is_action_just_pressed("force_fall")
|
|
return fallInput
|
|
|
|
static func dash_input() -> bool:
|
|
var dashInput: bool = Input.is_action_just_pressed("dash")
|
|
return dashInput
|