Added player and a basic test level
This commit is contained in:
23
Entities/Player/player_state_scripts/game_input_events.gd
Normal file
23
Entities/Player/player_state_scripts/game_input_events.gd
Normal file
@@ -0,0 +1,23 @@
|
||||
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 wall_cling_input() -> bool:
|
||||
var wallClingInput: bool = Input.is_action_just_pressed("wall_cling")
|
||||
return wallClingInput
|
||||
Reference in New Issue
Block a user