Exemple #1
0
 void ClearnInfo()
 {
     m_ShenQiSlot.InitInfo(ItemSlotLogic.SLOT_TYPE.TYPE_ITEM, -1);
     m_ShenQiNameLable.text           = StrDictionary.GetClientDictionaryString("#{4966}");
     m_ShenQiSkillNameLable.text      = StrDictionary.GetClientDictionaryString("#{4960}"); //无
     m_ShenQiSkillLevLable.text       = "0/0";
     m_ShenQiSkillDecLable.text       = StrDictionary.GetClientDictionaryString("#{5235 }");
     m_SheiQiSkillUpSuiPianLabel.text = "0";
     //经验 元宝 经验
     m_CoinNumLabel.text = Utils.ConvertLargeNumToString(GameManager.gameManager.PlayerDataPool.Money.GetMoney_Coin());
     m_YBNumLable.text   = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBao().ToString();
     m_ExpNumLable.text  = Utils.ConvertLargeNumToString(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Exp);
     for (int i = 0; i < (int)ShenQiInfo.MAXRANDATTRNUM; i++)
     {
         m_AttrTypeLable[i].text = StrDictionary.GetClientDictionaryString("#{4960}"); //无
         m_AttrNumLable[i].gameObject.SetActive(false);
         m_AttrToggle[i].value = false;
         m_AttrToggle[i].gameObject.SetActive(false);
     }
     m_CoinNeedLable.text          = "0";
     m_YBNeedLable.text            = "0";
     m_ExpNeedLable.text           = "0";
     m_ShenQiCombatValueLable.text = "0";
     m_ShowSkillInfoNextBt.SetActive(false);
     m_ShowSkillInfoBackBt.SetActive(false);
     m_ShowHelp.SetActive(false);
 }
Exemple #2
0
    void UpDateUI(int nShopTabID)
    {
        Tab_GongJiShop ShopTab = TableManager.GetGongJiShopByID(nShopTabID, 0);

        if (ShopTab == null)
        {
            return;
        }

        Price        = ShopTab.Price;
        ConsumItemID = ShopTab.ConsumItemID;

        Tab_CommonItem ShopItem = TableManager.GetCommonItemByID(ShopTab.ItemID, 0);

        if (ShopItem == null)
        {
            return;
        }

        m_ItemSlot.InitInfo(ItemSlotLogic.SLOT_TYPE.TYPE_ITEM, ShopTab.ItemID, ItemOnClick);

        if (null != m_NameLabel)
        {
            m_NameLabel.text = ShopItem.Name;
        }
    }
Exemple #3
0
    public void InitInfo(int nGoodsId, ItemSlotLogic.SLOT_TYPE eSlotType, int nItemID, int nGoodsNum, int nPrice, bool bBind,
                         CG_BUY_YUANBAOGOODS.DEADLINE_TYPE eDeadlineType, string strItemName)
    {
        m_CurNum             = 1;
        m_NumInput.value     = m_CurNum.ToString();
        m_ItemNameLabel.text = strItemName;

        m_GoodsId   = nGoodsId;
        m_eSlotType = eSlotType;
        m_ItemID    = nItemID;
        //m_GoodsNum = nGoodsNum;
        m_ItemSlot.InitInfo(eSlotType, nItemID, GoodsOnClick);
        m_ItemPrice     = nPrice;
        m_bChooseBind   = bBind;
        m_eDeadlineType = eDeadlineType;
        UpdateSumPrice();
        UpdatePresentButton(nGoodsId);

        if (IsLimitVipBox())
        {
            m_InputBoxCollider.enabled = false;
        }
        else
        {
            m_InputBoxCollider.enabled = true;
        }
    }
    public void Init(Tab_MasterShop tabMasterShop)
    {
        if (null == tabMasterShop)
        {
            return;
        }

        if (GameManager.gameManager.PlayerDataPool.IsHaveMaster() == false ||
            GameManager.gameManager.PlayerDataPool.IsMasterReserveMember() == true)
        {
            m_BuyItemBtn.disabledSprite = "daanniuhuihua";
            m_BuyItemBtn.hoverSprite    = "daanniuhuihua";
            m_BuyItemBtn.normalSprite   = "daanniuhuihua";
            m_BuyItemBtn.pressedSprite  = "daanniuhuihua";

            m_BuyItemBtn.enabled = false;
            m_BuyItemBtn.enabled = true;               //  先置false再置true是为了刷新sprite

            m_nIsItemCanBuy = false;
        }
        else
        {
            m_nIsItemCanBuy = true;
        }

        m_ItemID        = tabMasterShop.ItemID;
        m_nPrice        = tabMasterShop.Price;
        m_nConsumItemID = tabMasterShop.ConsumItemID;
        Tab_CommonItem tabCommonItem = TableManager.GetCommonItemByID(m_ItemID, 0);

        if (tabCommonItem == null)
        {
            return;
        }
        m_Name = tabCommonItem.Name;

        m_ItemSlot.InitInfo(ItemSlotLogic.SLOT_TYPE.TYPE_ITEM, m_ItemID, GoodsOnClick);

        if (null != m_NameLabel)
        {
            m_NameLabel.text = m_Name;
        }
        if (null != m_PriceContent)
        {
            m_PriceContent.text = tabMasterShop.Price.ToString();
        }

        m_nShopItemChangeMax = tabMasterShop.MaxChangeNum;
    }
Exemple #5
0
    public void Init(Tab_YuanBaoShop tabYuanBaoShop)
    {
        m_GoodsId      = tabYuanBaoShop.Id;
        m_eItemType    = (ITEM_TYPE)tabYuanBaoShop.ItemType;
        m_ItemID       = tabYuanBaoShop.ItemID;
        m_Num          = tabYuanBaoShop.Num;
        m_PriceWeek    = tabYuanBaoShop.PriceWeek;
        m_SaleWeek     = tabYuanBaoShop.SaleWeek;
        m_PriceMonth   = tabYuanBaoShop.PriceMonth;
        m_SaleMonth    = tabYuanBaoShop.SaleMonth;
        m_PriceForever = tabYuanBaoShop.PriceForever;
        m_SaleForever  = tabYuanBaoShop.SaleForever;

        m_ItemSlot.InitInfo(ConvertGoodsTypeToSlotType(m_eItemType), m_ItemID, GoodsOnClick);
        m_NumContent.text = m_Num.ToString();
        SetNameLabel();
        SetPriceLabel();
    }
Exemple #6
0
 void ShowUnEquipPage()
 {
     //m_Page_Help.gameObject.SetActive(false);
     m_Page_Equip.gameObject.SetActive(false);
     CloseEquip();
     m_Page_UnEquip.gameObject.SetActive(true);
     m_GemHelpInfo.SetActive(false);
     if (m_CurGemSlot >= 0 && m_CurGemSlot < (int)CONSTVALUE.GEM_SLOT_NUM)
     {
         int gemId = m_GemSlotId[m_CurGemSlot];
         if (gemId >= 0)
         {
             Tab_CommonItem line = TableManager.GetCommonItemByID(gemId, 0);
             if (line != null)
             {
                 m_ChooseGem.InitInfo(ItemSlotLogic.SLOT_TYPE.TYPE_ITEM, gemId);
                 m_ChooseGemNameLabel.text = line.Name;
                 m_ChooseGemAttrLabel.text = ItemTool.GetGemAttr(gemId);
             }
         }
     }
 }
Exemple #7
0
    /// <summary>
    /// 更新宝石物品
    /// </summary>
    public void UpdateGemItemList()
    {
        GameItemContainer BackPack = GameManager.gameManager.PlayerDataPool.BackPack;

        m_GemItemList = ItemTool.ItemFilter(BackPack, (int)ItemClass.STRENGTHEN, (int)StrengthenSubClass.GEM);
        m_GemItemList = GemFilter(m_GemItemList);

        for (int nIndex = 0; nIndex < GameItemContainer.MAXSIZE_BACKPACK; ++nIndex)
        {
            Transform ItemTrans = m_GemListGrid.transform.FindChild((nIndex + 1000).ToString());
            if (ItemTrans != null)
            {
                if (nIndex < m_GemItemList.Count)
                {
                    ItemTrans.gameObject.SetActive(true);
                    Transform child = ItemTrans.FindChild("ItemSlot");
                    if (child != null)
                    {
                        ItemSlotLogic tempIS = child.gameObject.GetComponent <ItemSlotLogic>();
                        if (null != tempIS)
                        {
                            tempIS.InitInfo(ItemSlotLogic.SLOT_TYPE.TYPE_ITEM,
                                            m_GemItemList[nIndex].DataID,
                                            null,
                                            m_GemItemList[nIndex].StackCount.ToString(),
                                            true);
                        }
                    }
                }
                else
                {
                    ItemTrans.gameObject.SetActive(false);
                }
            }
        }
        ClearGemItemChoose();
    }