Пример #1
0
 void ShowPrizeItem(ItemSlotLogic itemSlot, int id, int num)
 {
     itemSlot.gameObject.SetActive(true);
     if (id < 0)
     {
         itemSlot.gameObject.SetActive(false);
     }
     else if (id == 0)
     {
         //金币
         itemSlot.InitInfo_Coin(null, num.ToString(), true);
     }
     else if (id == 1)
     {
         //元宝
         itemSlot.InitInfo_Yuanbao(null, num.ToString(), true);
     }
     else if (id == 2)
     {
         //绑定元宝
         itemSlot.InitInfo_YuanbaoBind(null, num.ToString(), true);
     }
     else
     {
         //物品
         itemSlot.InitInfo_Item(id, ItemSlotLogic.OnClickOpenTips, num.ToString(), true);
     }
 }
Пример #2
0
    public void OnRebirthClick(Fellow fellow)
    {
        if (fellow == null)
        {
            return;
        }

        if (false == fellow.IsValid())
        {
            return;
        }

        Tab_CabalFellowAttr tabAttr = TableManager.GetCabalFellowAttrByID(fellow.DataId, 0);

        if (tabAttr == null)
        {
            return;
        }

        Tab_CabalFellowAttr tabBaby = TableManager.GetCabalFellowAttrByID(tabAttr.BabyFellowId, 0);

        if (tabBaby == null)
        {
            LogModule.ErrorLog("The fellow has not baby state, fellow id = " + fellow.DataId);
            return;
        }

        m_CurFellowIcon.spriteName         = fellow.GetIcon();
        m_CurFellowQualityFrame.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
        m_CurFellowNameLabel.text          = fellow.Name;
        m_RebirthFellowIcon.spriteName     = tabBaby.Icon;
        m_RebirthFellowNameLabel.text      = tabBaby.Name;
        m_RebirthItemSlot.InitInfo_Yuanbao(null, GlobeVar.PARTNER_REBIRTH_YUANBAO.ToString(), true);

        m_RebirthWindow.SetActive(true);

        m_FellowBuffer = fellow;
    }