Exemple #1
0
    void RefreshPanelActive(RuneInWhichPanel type)
    {
        intentify_panel.SafeSetActive(type == RuneInWhichPanel.Intentify);
        evo_panel.SafeSetActive(type == RuneInWhichPanel.Evolve);

        InitializeText(type);
    }
Exemple #2
0
    void InitializeText(RuneInWhichPanel type)
    {
        var content = WindowCache.GetComponent <Text>("inten_evo_panel/tipPanel/Text");

        if (type == RuneInWhichPanel.Intentify)
        {
            Util.SetText(content, (int)TextForMatType.RuneUIText, 31);
        }
        else
        {
            Util.SetText(content, (int)TextForMatType.RuneUIText, 32);
        }
    }
Exemple #3
0
 void SwitchSubPanel(RuneInWhichPanel panel, PItem item)
 {
     chooseItem.UnInitialize();
     opRune.UnInitialize();
     if (panel == RuneInWhichPanel.Equip)
     {
         chooseItem.Initialize(item);
     }
     else
     {
         opRune.Initialize(panel, item);
     }
 }
Exemple #4
0
    void ChooseWhitchPanle(RuneInWhichPanel type, PItem item)
    {
        if (type == RuneInWhichPanel.Equip)
        {
            return;
        }
        if (item == null || item.growAttr == null || item.growAttr.runeAttr == null)
        {
            return;
        }

        _successPanel.SafeSetActive(false);
        tipPanel.SafeSetActive(false);

        RefreshData(item, false, type);
    }
Exemple #5
0
    void RefreshData(PItem item, bool success, RuneInWhichPanel type)
    {
        if (type == RuneInWhichPanel.Equip)
        {
            return;
        }
        _type   = type;
        curItem = item;
        moduleRune.evolveList.Clear();
        moduleRune.swallowedIdList.Clear();

        if (view)
        {
            view.progress = 0;
        }

        RefreshPanelActive(type);
        if (type == RuneInWhichPanel.Intentify)
        {
            RefreshDefault(item);

            if (!success)
            {
                RefreshNoChangePanel(item);
            }
            else
            {
                Util.SetText(runeLv, $"Lv.{item.growAttr.runeAttr.level}");
                pres.PlayAnimToPreview(moduleRune.GetExpProgress(curItem) + curItem.growAttr.runeAttr.level);
                moduleGlobal.ShowMessage(Util.GetString((int)TextForMatType.RuneUIText, 30));
            }

            RefreshProgress();
            RefreshChangePanel(item);

            moduleRune.GetUpLvList(item);
            dataSource.SetItems(moduleRune.upLevelList);
            noItmesTip.SafeSetActive(moduleRune.upLevelList.Count < 1);
            return;
        }


        if (type == RuneInWhichPanel.Evolve)
        {
            _RefreshPreViewPanel(moduleRune.evolveList);
            RefreshCoin();
            _RefreshStar(item);

            if (!success)
            {
                curItem.CopyTo(ref beforeItem);
                _RefreshNoChange(item);
            }
            else
            {
                _SuccessPanel();
            }

            moduleRune.GetUpStarList(item);
            moduleRune.SortGuideItem();
            dataSource.SetItems(moduleRune.upStarList);
            noItmesTip.SafeSetActive(moduleRune.upStarList.Count < 1);
        }
    }