示例#1
0
        public void RefreshIcon()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mTrustMasterRewardBase, (UnityEngine.Object)null))
            {
                return;
            }
            ConceptCardTrustRewardItemParam reward = this.mConceptCardData.GetReward();

            if (reward != null)
            {
                bool is_on = reward.reward_type == eRewardType.ConceptCard;
                this.SwitchObject(is_on, ((Component)this.mTrustMasterRewardCardIcon).get_gameObject(), this.mTrustMasterRewardItemIconObject);
                this.mTrustMasterRewardBase.get_gameObject().SetActive(true);
                if (is_on)
                {
                    ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(reward.iname);
                    if (cardDataForDisplay == null)
                    {
                        return;
                    }
                    this.mTrustMasterRewardCardIcon.Setup(cardDataForDisplay);
                }
                else
                {
                    this.LoadImage(reward.GetIconPath(), this.mTrustMasterRewardIcon);
                }
            }
            else
            {
                this.mTrustMasterRewardBase.get_gameObject().SetActive(false);
            }
        }
示例#2
0
 public bool SetArtifact(ConceptCardTrustRewardItemParam reward_item)
 {
     if (string.IsNullOrEmpty(reward_item.iname))
     {
         return(false);
     }
     ArtifactDetailWindow.SetArtifactParam(MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(reward_item.iname));
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
     return(true);
 }
示例#3
0
        public void RefreshFrame()
        {
            ConceptCardTrustRewardItemParam reward = this.mConceptCardData.GetReward();

            if (reward == null)
            {
                return;
            }
            this.SetSprite(this.mTrustMasuterRewardFrame, reward.GetFrameSprite());
        }
示例#4
0
        public bool SetConceptCard(ConceptCardTrustRewardItemParam reward_item)
        {
            if (string.IsNullOrEmpty(reward_item.iname))
            {
                return(false);
            }
            ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardParam(reward_item.iname).iname);

            GlobalVars.SelectedConceptCardData.Set(cardDataForDisplay);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 13);
            return(true);
        }
示例#5
0
        private void RefreshRewardAmountCount()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mTrustMasterRewardAmountCountParent, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.mTrustMasterRewardAmountCount, (UnityEngine.Object)null))
            {
                return;
            }
            this.mTrustMasterRewardAmountCountParent.SetActive(false);
            ConceptCardTrustRewardItemParam reward = this.mConceptCardData.GetReward();

            if (reward == null || reward.reward_num <= 1)
            {
                return;
            }
            this.mTrustMasterRewardAmountCountParent.get_gameObject().SetActive(true);
            this.mTrustMasterRewardAmountCount.set_text(reward.reward_num.ToString());
        }
        public void SetConceptCard(ConceptCardTrustRewardItemParam reward_item)
        {
            if (string.IsNullOrEmpty(reward_item.iname))
            {
                return;
            }
            ConceptCardParam conceptCardParam = MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardParam(reward_item.iname);

            this.mItemName.set_text(conceptCardParam.name);
            DataSource.Bind <ConceptCardParam>(((Component)this).get_gameObject(), conceptCardParam);
            if (!Object.op_Inequality((Object)this.mCardIcon, (Object)null))
            {
                return;
            }
            ((Component)this.mCardIcon).get_gameObject().SetActive(true);
            this.mCardIcon.Setup(ConceptCardData.CreateConceptCardDataForDisplay(conceptCardParam.iname));
        }
        public void SetArtifact(ConceptCardTrustRewardItemParam reward_item)
        {
            if (string.IsNullOrEmpty(reward_item.iname))
            {
                return;
            }
            ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(reward_item.iname);

            this.mItemName.set_text(artifactParam.name);
            DataSource.Bind <ArtifactParam>(((Component)this).get_gameObject(), artifactParam);
            if (!Object.op_Inequality((Object)this.mArtifactIcon, (Object)null))
            {
                return;
            }
            ((Component)this.mArtifactIcon).get_gameObject().SetActive(true);
            this.mArtifactIcon.UpdateValue();
        }
示例#8
0
        public bool SetItem(ConceptCardTrustRewardItemParam reward_item)
        {
            if (string.IsNullOrEmpty(reward_item.iname))
            {
                return(false);
            }
            ItemParam itemParam = MonoSingleton <GameManager> .Instance.GetItemParam(reward_item.iname);

            Transform parent = ((Component)this).get_transform().get_parent();

            if (Object.op_Inequality((Object)parent, (Object)null))
            {
                DataSource.Bind <ItemParam>(((Component)parent).get_gameObject(), itemParam);
                ItemData itemDataByItemId = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(itemParam.iname);

                DataSource.Bind <ItemData>(((Component)parent).get_gameObject(), itemDataByItemId);
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
            return(true);
        }
示例#9
0
        public void ShowDetail()
        {
            this.mConceptCardData = ConceptCardManager.Instance.SelectedConceptCardData;
            if (this.mConceptCardData == null)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
            }
            else
            {
                ConceptCardTrustRewardItemParam reward = this.mConceptCardData.GetReward();
                if (reward == null)
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
                }
                else
                {
                    bool flag = false;
                    switch (reward.reward_type)
                    {
                    case eRewardType.Item:
                        flag = this.SetItem(reward);
                        break;

                    case eRewardType.Artifact:
                        flag = this.SetArtifact(reward);
                        break;

                    case eRewardType.ConceptCard:
                        flag = this.SetConceptCard(reward);
                        break;
                    }
                    if (flag)
                    {
                        return;
                    }
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
                }
            }
        }
        public void SetData(ConceptCardData data)
        {
            ConceptCardTrustRewardItemParam reward = data.GetReward();

            if (reward == null)
            {
                return;
            }
            switch (reward.reward_type)
            {
            case eRewardType.Item:
                this.SetItem(reward);
                break;

            case eRewardType.Artifact:
                this.SetArtifact(reward);
                break;

            case eRewardType.ConceptCard:
                this.SetConceptCard(reward);
                break;
            }
            this.mItemAmount.set_text(reward.reward_num.ToString());
        }