示例#1
0
 private void Refresh()
 {
     if (this.mConceptCardData == null)
     {
         return;
     }
     if (Object.op_Inequality((Object)this.mIllustImage, (Object)null))
     {
         string path = AssetPath.ConceptCard(this.mConceptCardData.Param);
         if (((Object)this.mIllustImage.get_mainTexture()).get_name() != Path.GetFileName(path))
         {
             MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.mIllustImage, path);
         }
     }
     if (Object.op_Inequality((Object)this.mIllustFrame, (Object)null))
     {
         this.mIllustFrame.ImageIndex = Mathf.Min(Mathf.Max((int)this.mConceptCardData.Rarity, 0), this.mIllustFrame.Images.Length - 1);
     }
     this.SetText(this.mCardNameText, this.mConceptCardData.Param.name);
     this.SetFlavorTextText();
     this.SetFavoriteToggle(this.mConceptCardData.Favorite);
     if (Object.op_Inequality((Object)this.mStarGauge, (Object)null))
     {
         this.mStarGauge.Max   = (int)this.mConceptCardData.Rarity + 1;
         this.mStarGauge.Value = (int)this.mConceptCardData.Rarity + 1;
     }
     foreach (Scrollbar componentsInChild in (Scrollbar[])((Component)this).GetComponentsInChildren <Scrollbar>())
     {
         componentsInChild.set_value(1f);
     }
 }
        public void SetData(ConceptCardData data)
        {
            string path = AssetPath.ConceptCard(data.Param);

            if (Object.op_Inequality((Object)this.mCardImage, (Object)null))
            {
                MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.mCardImage, path);
            }
            if (!Object.op_Inequality((Object)this.mCardImageAdd, (Object)null))
            {
                return;
            }
            MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.mCardImageAdd, path);
        }
        private void Start()
        {
            if (FlowNode_ButtonEvent.currentValue == null)
            {
                return;
            }
            SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;

            if (currentValue == null)
            {
                return;
            }
            ConceptCardIcon component = currentValue.GetComponent <ConceptCardIcon>("_self");

            if (Object.op_Equality((Object)component, (Object)null))
            {
                return;
            }
            this.mConceptCardData = component.ConceptCard;
            if (this.mConceptCardData == null)
            {
                return;
            }
            if (Object.op_Inequality((Object)this.mIllustImage, (Object)null))
            {
                string path = AssetPath.ConceptCard(this.mConceptCardData.Param);
                if (((Object)this.mIllustImage.get_mainTexture()).get_name() != Path.GetFileName(path))
                {
                    MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.mIllustImage, path);
                }
            }
            if (Object.op_Inequality((Object)this.mIllustFrame, (Object)null))
            {
                this.mIllustFrame.ImageIndex = Mathf.Min(Mathf.Max((int)this.mConceptCardData.Rarity, 0), this.mIllustFrame.Images.Length - 1);
            }
            this.SetText(this.mCardNameText, this.mConceptCardData.Param.name);
            this.SetFlavorTextText();
            if (Object.op_Inequality((Object)this.mStarGauge, (Object)null))
            {
                this.mStarGauge.Max   = (int)this.mConceptCardData.Rarity + 1;
                this.mStarGauge.Value = (int)this.mConceptCardData.Rarity + 1;
            }
            foreach (Scrollbar componentsInChild in (Scrollbar[])((Component)this).GetComponentsInChildren <Scrollbar>())
            {
                componentsInChild.set_value(1f);
            }
        }
        private void Start()
        {
            if (Object.op_Equality((Object)ConceptCardManager.Instance, (Object)null))
            {
                return;
            }
            ConceptCardManager instance        = ConceptCardManager.Instance;
            ConceptCardData    conceptCardData = instance.SelectedConceptCardMaterialData == null ? instance.SelectedConceptCardData : instance.SelectedConceptCardMaterialData;

            if (!Object.op_Inequality((Object)this.Image, (Object)null))
            {
                return;
            }
            MonoSingleton <GameManager> .Instance.ApplyTextureAsync((RawImage)this.Image, AssetPath.ConceptCard(conceptCardData.Param));
        }
示例#5
0
        public void Setup(ConceptCardData conceptCardData)
        {
            try
            {
                UnitParam unitParam = MonoSingleton <GameManager> .Instance.GetUnitParam(conceptCardData.Param.first_get_unit);

                ConceptCardParam card = conceptCardData.Param;
                if (Object.op_Inequality((Object)this.m_ConceptCardImage, (Object)null) && card != null)
                {
                    MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.m_ConceptCardImage, AssetPath.ConceptCard(card));
                }
                if (Object.op_Inequality((Object)this.m_UnitImage, (Object)null) && unitParam != null)
                {
                    MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.m_UnitImage, AssetPath.UnitImage(unitParam, unitParam.GetJobId(0)));
                }
                if (Object.op_Inequality((Object)this.m_UnitBlurImage, (Object)null) && unitParam != null)
                {
                    MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.m_UnitBlurImage, AssetPath.UnitImage(unitParam, unitParam.GetJobId(0)));
                }
                if (Object.op_Inequality((Object)this.m_ConceptCardFrame, (Object)null))
                {
                    this.m_ConceptCardFrame.ImageIndex = card.rare;
                }
                if (Object.op_Inequality((Object)this.m_UnitTextDescription, (Object)null))
                {
                    this.m_UnitTextDescription.set_text(LocalizedText.Get("sys.CONCEPT_CARD_UNIT_GET_DESCRIPTION", (object)card.name, (object)unitParam.name));
                }
                this.SetConceptCardRarity(card.rare + 1);
                this.SetUnitRarity((int)unitParam.rare + 1);
                this.m_UnitRarity = (int)unitParam.rare;
                this.StartCoroutine(this.WaitConceptCardEffectEnd());
            }
            catch
            {
                this.SetConceptCardRarity(1);
                this.SetUnitRarity(1);
            }
        }