|
@ -33,6 +33,8 @@ var is_sprinting: bool = false |
|
|
func _input(event: InputEvent) -> void: |
|
|
func _input(event: InputEvent) -> void: |
|
|
if event is InputEventMouseMotion: |
|
|
if event is InputEventMouseMotion: |
|
|
_handle_mouse_movement(event.relative) |
|
|
_handle_mouse_movement(event.relative) |
|
|
|
|
|
elif event.is_action_pressed("throw_item"): # TODO: Move to state? |
|
|
|
|
|
EntityManager.drop_block.emit(InventoryManager.quick_slot_item_id, head.global_position, -head.global_basis.z, 10.0) |
|
|
|
|
|
|
|
|
func _physics_process(delta: float) -> void: |
|
|
func _physics_process(delta: float) -> void: |
|
|
is_crouching = Input.is_action_pressed("crouch") or ray_cast_crouch.is_colliding() |
|
|
is_crouching = Input.is_action_pressed("crouch") or ray_cast_crouch.is_colliding() |
|
|