コード例 #1
0
        void BeginShow(bool paginate, bool setSelection, Inventory forInventory, Inventory linkedInventory, UIElementHolder uiHolder, int maxButtons, int uiIndex, int otherIndex)
        {
            if (forInventory != this.inventory)
            {
                currentLinkedInventory = forInventory;
            }

            if (inventoryButtonsPerInventory[uiIndex] == null)
            {
                inventoryButtonsPerInventory[uiIndex] = uiHolder.GetAllElements(maxButtons);
            }
            UpdateUIButtons(paginate, forInventory, linkedInventory, maxButtons, uiIndex, otherIndex);
            if (setSelection)
            {
                UIManager.SetSelection(inventoryButtonsPerInventory[uiIndex][0].gameObject);
            }
        }
コード例 #2
0
        IEnumerator SetSelection(GameObject selection)
        {
            yield return(new WaitForEndOfFrame());

            UIManager.SetSelection(selection);
        }