Exemple #1
0
 public void OnHotbarScroll(InputAction.CallbackContext context)
 {
     switch (context.phase)
     {
     case InputActionPhase.Performed:
         Vector2 value = context.ReadValue <Vector2>();
         if (value.y > 0)
         {
             hotbar.MoveSelectionUp(!isHoldShift);
         }
         else if (value.y < 0)
         {
             hotbar.MoveSelectionDown(!isHoldShift);
         }
         break;
     }
 }