14 lines
396 B
GDScript
14 lines
396 B
GDScript
class_name PlayerInput extends Node
|
|
|
|
@export var interaction:PlayerInteraction
|
|
@export var movement:PlayerMovement
|
|
|
|
func _process(delta: float) -> void:
|
|
if Input.is_action_just_pressed("pause"):
|
|
PAUSE.menuPause()
|
|
|
|
if Input.is_action_just_pressed("interact"):
|
|
interaction.interact()
|
|
|
|
movement.inputDir = Input.get_vector("move_left", "move_right", "move_back", "move_forward").normalized()
|