Exemplo n.º 1
0
    public override void onClickBackToMainMenu(GameObject go)
    {
        if (reinforcePanel.gameObject.activeSelf)
        {
            reinforcePanel.hide();
            return;
        }
        else if (composePanel.gameObject.activeSelf)
        {
            composePanel.hide();
            return;
        }
        else if (sellPanel.gameObject.activeSelf)
        {
            sellPanel.hide();
            return;
        }


        foreach (KeyValuePair <string, GameIDData> kv in GameDataManager.instance.partsInventory)
        {
            kv.Value.isNew = false;
        }

        UILobby.setHasNewEquipRune(false);


        base.onClickBackToMainMenu(go);

        TutorialManager.uiTutorial.tutorialEndCircleEffect.hide();
    }
    void settingNewInvenItem(List <GameIDData> targetList, GameIDData.Type invenType)
    {
        bool hasNewItem = false;

        foreach (GameIDData gd in targetList)
        {
            // 이전 목록에 있고 그 녀석이 new 였다면.
            if (_invenPrevItemChecker.ContainsKey(gd.serverId) && _invenPrevItemChecker[gd.serverId] > 0)
            {
                if (_invenNewItemChecker[gd.serverId] > 0)
                {
                    gd.isNew   = true;
                    hasNewItem = true;
                }

                --_invenPrevItemChecker[gd.serverId];
                --_invenNewItemChecker[gd.serverId];
            }
            // 이전 목록에 없으면 무조건 new.
            else
            {
                gd.isNew   = true;
                hasNewItem = true;
            }
        }

        _invenPrevItemChecker.Clear();
        _invenNewItemChecker.Clear();

        switch (invenType)
        {
        case GameIDData.Type.Equip:
            UILobby.setHasNewEquipRune(hasNewItem);
            break;

        case GameIDData.Type.Skill:
            UILobby.setHasNewSkillRune(hasNewItem);
            break;

        case GameIDData.Type.Unit:
            UILobby.setHasNewUnitRune(hasNewItem);
            break;
        }
    }