private void HandleInputs()
 {
     if (Input.GetKeyDown(KeyCode.E))
     {
         PickupManager.Pickup();
     }
     if (!EventSystem.current.IsPointerOverGameObject() && !isRolling && Input.GetMouseButtonDown(0) && !isAttacking && stamina.HasStaminaLeft())
     {
         HandleAttacking();
     }
     else if (canMove && canRoll && Input.GetKeyDown(KeyCode.Space) && !isAttacking && !isRolling && stamina.HasStaminaLeft())
     {
         HandleRolling();
     }
     else if (Input.GetKeyUp(KeyCode.LeftShift))
     {
         HandleSprinting();
     }
     if (Input.GetMouseButton(1) && !isAttacking)
     {
         isBlocking = true;
         moveAnimationSpeedMultiplier = 1.2f;
     }
     else
     {
         isBlocking = false;
     }
 }
예제 #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = new PickupManager();
     }
 }