Ejemplo n.º 1
0
    PlayerInventory GetCurrentlyFocusedInventory(SlotGroupType slotGroupType)
    {
        for (int i = 0; i < m_slotGroups.Count; i++)
        {
            switch (slotGroupType)
            {
            case SlotGroupType.Bow:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.Bow)
                {
                    return(m_slotGroups[i].inventory);
                }
                break;

            case SlotGroupType.Wear:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.Wear)
                {
                    return(m_slotGroups[i].inventory);
                }
                break;

            case SlotGroupType.Pool:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.Pool)
                {
                    return(m_slotGroups[i].inventory);
                }
                break;
            }
        }
        return(null);
    }
Ejemplo n.º 2
0
    void ActivateSlotGroup(SlotGroupType slotGroupType)
    {
        for (int i = 0; i < m_slotGroups.Count; i++)
        {
            switch (slotGroupType)
            {
            case SlotGroupType.Bow:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.Bow)
                {
                    m_slotGroups[i].SetActiveForSelectionState(true);
                }
                break;

            case SlotGroupType.Wear:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.Wear)
                {
                    m_slotGroups[i].SetActiveForSelectionState(true);
                }
                break;

            case SlotGroupType.CarriedGear:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.CarriedGear)
                {
                    m_slotGroups[i].SetActiveForSelectionState(true);
                }
                break;

            case SlotGroupType.CraftItems:
                break;

            case SlotGroupType.Pool:
                if (m_slotGroups[i].m_slotGroupType == SlotGroupType.Pool)
                {
                    m_slotGroups[i].SetActiveForSelectionState(true);
                }
                break;

            default:
                break;
            }
        }
    }
Ejemplo n.º 3
0
 public SlotGroup(RenderedSlot[] slots, SlotGroupType type, IWindow window)
 {
     this.window = window;
     this.slots  = slots;
     this.type   = type;
 }