Beispiel #1
0
    public void chooseEquipedRune()
    {
        GoddessDetailPanel GDP = GetComponentInParent <GoddessDetailPanel>();

        if (GDP == null)
        {
            return;
        }
        SDDataManager.Instance.addRuneToGoddessSlot(itemHashcode, GDP.CurrentGoddess.ID
                                                    , GDP.currentGoddessRunePos);
        GDP.refreshGoddessList();
        //
        HEWPageController page = GDP.runePanel.GetComponentInChildren <HEWPageController>();

        page.ItemsInit(SDConstants.ItemType.Rune);
        //Debug.Log("C--R");
        GDP.RDP.initDetailPanel(SDDataManager.Instance.getRuneOwnedByHashcode(itemHashcode));
    }
Beispiel #2
0
    public void initRuneInPage(GDERuneData E)
    {
        if (E == null || E.Hashcode <= 0)
        {
            isEmpty = true; return;
        }
        isEmpty = false;
        if (upText)
        {
            upText.text = SDGameManager.T("Lv.")
                          + E.level;
        }
        if (starVision)
        {
            starVision.gameObject.SetActive(false);
        }
        RuneItem item = SDDataManager.Instance.getRuneItemById(E.id);

        //
        frameImg.sprite  = SDDataManager.Instance.baseFrameSpriteByRarity(item.Quality);
        itemBgImg.sprite = SDDataManager.Instance.baseBgSpriteByRarity(item.Quality);
        //
        itemHashcode = E.Hashcode;
        itemId       = E.id;
        GoddessDetailPanel GDP = GetComponentInParent <GoddessDetailPanel>();

        if (GDP == null)
        {
            return;
        }
        string goddessId = GDP.CurrentGoddess.ID;

        isSelected = false;
        if (SDDataManager.Instance.checkRuneEquippedByGoddess(itemHashcode, goddessId, out int pos))
        {
            isSelected   = true;
            index        = pos;
            upText.text += "-----" + index;
        }
        else if (SDDataManager.Instance.checkRuneStatus(itemHashcode))
        {
            isSelected = true;
        }
    }