Browse Source

Add throw_item to Player

pull/12/head
Ryan Reed 1 month ago
parent
commit
877ad2901c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      scenes/player/player.gd

+ 2
- 0
scenes/player/player.gd View File

@ -33,6 +33,8 @@ var is_sprinting: bool = false
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
_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:
is_crouching = Input.is_action_pressed("crouch") or ray_cast_crouch.is_colliding()


Loading…
Cancel
Save