Exemple #1
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            Script_InventoryManager t = (Script_InventoryManager)target;

            if (GUILayout.Button("Slot 0, Hotkey 1 (Equipment Slot 0)"))
            {
                t.HandleHotkeyStickUnstick(0, 0);
            }

            if (GUILayout.Button("Remove Item Slot 0"))
            {
                t.inventory.RemoveItemInSlot(0);
            }
        }
Exemple #2
0
    private void HandleInventoryHotKey(string keyCode, int slotIndex)
    {
        switch (keyCode)
        {
        case (Const_KeyCodes.Effect1):
            inventoryManager.HandleHotkeyStickUnstick(slotIndex, 0);
            break;

        case (Const_KeyCodes.Effect2):
            inventoryManager.HandleHotkeyStickUnstick(slotIndex, 1);
            break;

        case (Const_KeyCodes.Effect3):
            inventoryManager.HandleHotkeyStickUnstick(slotIndex, 2);
            break;

        case (Const_KeyCodes.Effect4):
            inventoryManager.HandleHotkeyStickUnstick(slotIndex, 3);
            break;

        default:
            break;
        }
    }