コード例 #1
0
 public void UpdateItem(FZengYibuffPeiZhi config)
 {
     this.buffId = config.id;
     this.m_textCost.set_text("x" + config.price);
     ResourceManager.SetSprite(this.m_imageBuffIcon, GameDataUtils.GetIcon(config.icon));
     ResourceManager.SetSprite(this.m_imageIconCost, GameDataUtils.GetIcon(DataReader <Items> .Get(config.coinType).littleIcon));
 }
コード例 #2
0
    private void RefreshUI()
    {
        int num = SpecialFightManager.Instance.CurBuffCount + 1;

        if (num <= DataReader <FZengYibuffPeiZhi> .DataList.get_Count())
        {
            this.mData = DataReader <FZengYibuffPeiZhi> .Get(num);

            if (this.mData != null)
            {
                ResourceManager.SetSprite(this.mBuffIcon, GameDataUtils.GetIcon(this.mData.icon));
                ResourceManager.SetSprite(this.mCoinIcon, GameDataUtils.GetIcon(DataReader <Items> .Get(this.mData.coinType).littleIcon));
                this.mBuffCount.set_text(num.ToString());
                this.mBuffName.set_text(GameDataUtils.GetChineseContent(this.mData.buffName, false));
                this.mBuffEffect.set_text(GameDataUtils.GetChineseContent(this.mData.descId, false));
                this.mTxDesc.set_text(GameDataUtils.GetChineseContent(DataReader <FJingYanFuBenPeiZhi> .Get("buffDescId").num, false));
                this.mTxPrice.set_text("x" + this.mData.price);
            }
            this.mGoConfirmFg.SetActive(true);
        }
        else
        {
            this.mGoConfirmFg.SetActive(false);
        }
    }
コード例 #3
0
    private void AddScrollCell(FZengYibuffPeiZhi config)
    {
        GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("SpecialInstanceBuffItem");

        instantiate2Prefab.get_transform().SetParent(this.m_buffList.get_transform(), false);
        instantiate2Prefab.SetActive(true);
        instantiate2Prefab.GetComponent <SpecialInstanceBuffItem>().UpdateItem(config);
        instantiate2Prefab.set_name("BuffItem" + config.id);
    }
コード例 #4
0
    public void OnCellBtnClick(GameObject go)
    {
        FZengYibuffPeiZhi fZengYibuffPeiZhi = DataReader <FZengYibuffPeiZhi> .Get(this.buffId);

        if (fZengYibuffPeiZhi == null)
        {
            return;
        }
        DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(502327, false), string.Format(GameDataUtils.GetChineseContent(this.tipsId, false), fZengYibuffPeiZhi.price + GameDataUtils.GetChineseContent(DataReader <Items> .Get(fZengYibuffPeiZhi.coinType).name, false), string.Empty), null, null, delegate
        {
            SpecialFightManager.Instance.BuyExperienceCopyBuffReq(this.buffId);
        }, GameDataUtils.GetChineseContent(500012, false), GameDataUtils.GetChineseContent(500011, false), "button_orange_1", "button_yellow_1", null);
    }
コード例 #5
0
    private void RefreshUI(int buffCount)
    {
        this.mTxSpecialBuffName.set_text(string.Empty);
        int key = Mathf.Max(1, buffCount);
        FZengYibuffPeiZhi fZengYibuffPeiZhi = DataReader <FZengYibuffPeiZhi> .Get(key);

        if (fZengYibuffPeiZhi != null)
        {
            ResourceManager.SetSprite(this.mSpecialBuffIcon, GameDataUtils.GetIcon(fZengYibuffPeiZhi.icon));
            this.mTxSpecialBuffName.set_text(GameDataUtils.GetChineseContent(fZengYibuffPeiZhi.buffName, false));
        }
        this.mTxSpecialBuffCount.set_text(buffCount.ToString());
    }
コード例 #6
0
    protected void OnUpdateBuff(int buffId)
    {
        if (!DataReader <FZengYibuffPeiZhi> .Contains(buffId))
        {
            this.BuffNoIcon.SetActive(true);
            this.BuffIcon.get_gameObject().SetActive(false);
            this.TextBuffName.set_text(GameDataUtils.GetChineseContent(502329, false));
        }
        else
        {
            FZengYibuffPeiZhi fZengYibuffPeiZhi = DataReader <FZengYibuffPeiZhi> .Get(buffId);

            this.BuffNoIcon.SetActive(false);
            this.BuffIcon.get_gameObject().SetActive(true);
            ResourceManager.SetSprite(this.BuffIcon, GameDataUtils.GetIcon(fZengYibuffPeiZhi.icon));
            this.TextBuffName.set_text(string.Empty);
        }
    }