Files
2026-video-game-project/Entities/Player/player_state_scripts/game_input_events.gd

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