コード例 #1
0
    public override void Enter()
    {
        base.Enter();
        Time.timeScale = 0.0f;

        if (isFirstEnter)
        {
            isFirstEnter = false;

            currentTab      = TabSelection.Weapon;
            currentViewPage = 0;
            // TODO: selection
            DisplayWeapon();
            tabGroup.SelectTab(tabGroup.tabs[0]);

            selectedViewIndex = 0;

            title.SetText("");
            content.SetText("");
        }
        else
        {
            tabGroup.SelectTab(tabGroup.tabs[(int)currentTab]);
            OnClickTab((int)currentTab);
        }

        OnClickView(selectedViewIndex);

        normMoveInputTimer = -1f;
    }
コード例 #2
0
    protected int CountTotalItemsOfTab(TabSelection tab)
    {
        int res = 0;

        switch (tab)
        {
        case TabSelection.Weapon:
            res = uiHandler.GM.player.playerRuntimeData.playerStock.weaponStock.Count;
            break;

        case TabSelection.Wearable:
            res = uiHandler.GM.player.playerRuntimeData.playerStock.wearableStock.Count;
            break;

        case TabSelection.Consumable:
            res = uiHandler.GM.player.playerRuntimeData.playerStock.consumableStock.Count;
            break;

        case TabSelection.KeyItem:
            res = uiHandler.GM.player.playerRuntimeData.playerStock.keyItemStock.Count;
            break;

        default:
            break;
        }

        return(res);
    }
コード例 #3
0
    protected void OnClickTab(int index)
    {
        currentTab = (TabSelection)index;

        switch (currentTab)
        {
        case TabSelection.Weapon:
            DisplayWeapon();
            break;

        case TabSelection.Wearable:
            DisplayWearable();
            break;

        case TabSelection.Consumable:
            DisplayConsumable();
            break;

        case TabSelection.KeyItem:
            DisplayKeyItem();
            break;

        default:
            break;
        }

        OnClickView(selectedViewIndex);
    }