feat: drop head

This commit is contained in:
timote koenig
2026-03-12 10:33:37 +01:00
parent 94e44ad7af
commit 67a1717b86
9 changed files with 183 additions and 55 deletions

View File

@@ -1,36 +1,35 @@
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.Windows;
public class PlayerInputController : MonoBehaviour
{
public InputActionAsset InputActions;
private InputAction m_headInteractAction;
private InputAction m_moveAction;
private InputAction m_lookAction;
private InputAction m_jumpAction;
private InputAction m_throwAction;
private InputAction m_pickupAction;
private InputAction m_shiftAction;
public Vector2 MoveAmount { get; private set; }
public Vector2 LookAmount { get; private set; }
public bool HeadInteractionPressed { get; private set; }
public bool JumpPressed { get; private set; }
public bool ShiftPressed { get; private set; }
public bool ThrowPressed { get; private set; }
public bool PickupPressed { get; private set; }
private void Awake()
{
var map = InputActions.FindActionMap("Player");
m_headInteractAction = map.FindAction("HeadInteract");
m_moveAction = map.FindAction("Move");
m_lookAction = map.FindAction("Look");
m_jumpAction = map.FindAction("Jump");
m_shiftAction = map.FindAction("Shift");
m_throwAction = map.FindAction("Throw");
m_pickupAction = map.FindAction("Pickup");
}
private void OnEnable()
@@ -51,6 +50,6 @@ public class PlayerInputController : MonoBehaviour
ShiftPressed = m_shiftAction.IsPressed();
JumpPressed = m_jumpAction.WasPressedThisFrame();
ThrowPressed = m_throwAction.WasPressedThisFrame();
PickupPressed = m_pickupAction.WasPressedThisFrame();
HeadInteractionPressed = m_headInteractAction.WasPressedThisFrame();
}
}