Beispiel #1
0
        private void DoSetupView()
        {
            base.view.transform.Find("GroupPanel").gameObject.SetActive(true);
            this.InitAnimationAndDialogManager();
            Transform transform = base.view.transform.Find("GroupPanel/GroupInfotPanel");

            transform.Find("GroupName").GetComponent <Text>().text = LocalizationGeneralLogic.GetText(EndlessGroupMetaDataReader.GetEndlessGroupMetaDataByKey(Singleton <EndlessModule> .Instance.currentGroupLevel).groupName, new object[0]);
            Color color  = Miscs.ParseColor(MiscData.Config.EndlessGroupUnSelectColor[Singleton <EndlessModule> .Instance.currentGroupLevel]);
            Color color2 = Miscs.ParseColor(MiscData.Config.EndlessGroupBGColor[Singleton <EndlessModule> .Instance.currentGroupLevel]);

            transform.Find("GroupName").GetComponent <Text>().color = color;
            base.view.transform.Find("BG/GroupColor").GetComponent <Image>().color = color2;
            int currentFinishProgress = Singleton <EndlessModule> .Instance.CurrentFinishProgress;

            transform.Find("FloorNum").GetComponent <Text>().text = (currentFinishProgress != 0) ? currentFinishProgress.ToString() : "-";
            base.view.transform.Find("GroupPanel/Result/Win").gameObject.SetActive(this.isSuccess);
            base.view.transform.Find("GroupPanel/Result/Lost").gameObject.SetActive(!this.isSuccess);
            if (!this.isSuccess)
            {
                base.view.transform.Find("BG/TriangleFill").GetComponent <Image>().material = Miscs.LoadResource <Material>("Material/ImageGrayscale", BundleType.RESOURCE_FILE);
                base.view.transform.Find("BG").GetComponent <Image>().material = Miscs.LoadResource <Material>("Material/ImageGrayscale", BundleType.RESOURCE_FILE);
            }
            else
            {
                base.view.transform.Find("BG/TriangleFill").GetComponent <Image>().material = null;
                base.view.transform.Find("BG").GetComponent <Image>().material = null;
            }
            this.SetupReward();
            this._dropItemAnimationManager.StartPlay(0f, true);
        }
Beispiel #2
0
        public void SetOutsideParticleColorByRarity(GameObject obj, int rarity)
        {
            ParticleSystem[] componentsInChildren = obj.GetComponentsInChildren <ParticleSystem>();
            int index  = 0;
            int length = componentsInChildren.Length;

            while (index < length)
            {
                Renderer component = componentsInChildren[index].GetComponent <Renderer>();
                if ((component != null) && (component.material.shader.name.IndexOf("Channel Mix") != -1))
                {
                    Color black = Color.black;
                    Color color = Color.black;
                    if ((rarity == 1) || (rarity == 2))
                    {
                        black = Miscs.ParseColor("#00E48F7F");
                        color = Miscs.ParseColor("#95FF967F");
                    }
                    else if (rarity == 3)
                    {
                        black = Miscs.ParseColor("#0041FF7F");
                        color = Miscs.ParseColor("#7081FF7F");
                    }
                    else if (((rarity == 4) || (rarity == 5)) || (rarity == 6))
                    {
                        black = Miscs.ParseColor("#3700FF7F");
                        color = Miscs.ParseColor("#8E72FF7F");
                    }
                    component.material.SetColor("_TintColor1", black);
                    component.material.SetColor("_TintColor2", color);
                }
                index++;
            }
        }
Beispiel #3
0
        private void SetupRarityView(StorageDataItemBase item)
        {
            base.transform.Find("AvatarStar").gameObject.SetActive(false);
            base.transform.Find("Star").gameObject.SetActive(false);
            string hexString = MiscData.Config.ItemRarityColorList[item.rarity];

            base.transform.Find("ItemIcon").GetComponent <Image>().color = Miscs.ParseColor(hexString);
            if (item is AvatarCardDataItem)
            {
                AvatarDataItem dummyAvatarDataItem = Singleton <AvatarModule> .Instance.GetDummyAvatarDataItem(AvatarMetaDataReaderExtend.GetAvatarIDsByKey(item.ID).avatarID);

                this.SetupAvatarStar(dummyAvatarDataItem.star);
                base.transform.Find("AvatarStar").gameObject.SetActive(true);
            }
            else if (!(item is AvatarFragmentDataItem))
            {
                base.transform.Find("Star").gameObject.SetActive(true);
                int rarity = item.rarity;
                if (item is WeaponDataItem)
                {
                    rarity = (item as WeaponDataItem).GetMaxRarity();
                }
                else if (item is StigmataDataItem)
                {
                    rarity = (item as StigmataDataItem).GetMaxRarity();
                }
                base.transform.Find("Star").GetComponent <MonoItemIconStar>().SetupView(item.rarity, rarity);
            }
        }
Beispiel #4
0
        private void SetupRarityView()
        {
            string hexString = MiscData.Config.ItemRarityColorList[this._item.rarity];

            base.transform.Find("ItemIcon").GetComponent <Image>().color = Miscs.ParseColor(hexString);
            base.transform.Find("Star").gameObject.SetActive(true);
            base.transform.Find("Star").GetComponent <MonoItemIconStar>().SetupView(this._item.rarity, this._item.maxRarity);
        }
Beispiel #5
0
        protected override bool SetupView()
        {
            this._groupColor = Miscs.ParseColor(MiscData.Config.EndlessGroupUnSelectColor[(int)Singleton <EndlessModule> .Instance.endlessData.get_group_level()]);
            this.SetupGroupList();
            this.SetupRank();
            this.SetupWarReportList();
            this.SetAllButtonsInteractable(Singleton <EndlessModule> .Instance.GetEndlessActivityStatus() == EndlessActivityStatus.InProgress);
            this.CheckEndlessReward();
            this.CheckIfBombBurst();
            Singleton <EndlessModule> .Instance.CheckAllAvatarHPChanged();

            Singleton <AssetBundleManager> .Instance.CheckSVNVersion();

            return(false);
        }
Beispiel #6
0
        protected override bool SetupView()
        {
            base.view.transform.Find("Btn").gameObject.SetActive(false);
            this._groupBGColor = Miscs.ParseColor(MiscData.Config.EndlessGroupBGColor[(int)this._rewardData.get_group_level()]);
            this.SetupRewardTilte();
            base.view.transform.Find("Dialog/Content/GroupPanel/GroupBGL/GroupIcon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(MiscData.Config.EndlessGroupSelectPrefabPath[(int)this._rewardData.get_group_level()]);
            Transform transform = base.view.transform.Find("Dialog/Content/GetProps");

            this.InitRewardList();
            for (int i = 1; i <= 3; i++)
            {
                Transform transform2 = transform.Find(i.ToString());
                if (i > this._gotRewardList.Count)
                {
                    transform2.gameObject.SetActive(false);
                }
                else
                {
                    RewardUIData data = this._gotRewardList[i - 1];
                    transform2.Find("Image").GetComponent <Image>().sprite = data.GetIconSprite();
                    transform2.Find("Num").GetComponent <Text>().text      = data.value.ToString();
                }
            }
            Transform transform3 = base.view.transform.Find("Dialog/Content/GroupPanel/Ranking");

            transform3.Find("Up").gameObject.SetActive(false);
            transform3.Find("Flat").gameObject.SetActive(false);
            transform3.Find("Down").gameObject.SetActive(false);
            switch (this._rewardData.get_reward_type())
            {
            case 1:
                transform3.Find("Up").gameObject.SetActive(true);
                break;

            case 2:
                transform3.Find("Flat").gameObject.SetActive(true);
                break;

            case 3:
                transform3.Find("Down").gameObject.SetActive(true);
                break;
            }
            base.view.transform.Find("Dialog/Content/GroupPanel/Label").gameObject.SetActive(false);
            return(false);
        }
Beispiel #7
0
        public void SetParticleColorByRarity(GameObject obj, int rarity)
        {
            string hexString = MiscData.Config.ItemRarityColorList[Mathf.Clamp(rarity, 0, MiscData.Config.ItemRarityColorList.Count - 1)];
            Color  color     = Miscs.ParseColor(hexString);

            ParticleSystem[] componentsInChildren = obj.GetComponentsInChildren <ParticleSystem>();
            int index  = 0;
            int length = componentsInChildren.Length;

            while (index < length)
            {
                Renderer component = componentsInChildren[index].GetComponent <Renderer>();
                if ((component == null) || (component.material.shader.name.IndexOf("Channel Mix") == -1))
                {
                    componentsInChildren[index].startColor = color;
                }
                index++;
            }
        }
Beispiel #8
0
 public static Color GetColor(string key)
 {
     return(Miscs.ParseColor(Config.Color[key].ToString()));
 }
Beispiel #9
0
 public Color GetBattleTypeColor()
 {
     return(Miscs.ParseColor(BattleTypeMetaDataReader.GetBattleTypeMetaDataByKey(this._metaData.battleType).colorCode));
 }
Beispiel #10
0
        private void SetupItemInfo()
        {
            base.transform.Find("Item/TitleRare/Green").gameObject.SetActive(false);
            base.transform.Find("Item/TitleRare/Blue").gameObject.SetActive(false);
            base.transform.Find("Item/TitleRare/Purple").gameObject.SetActive(false);
            base.transform.Find("Item/TitleRare/Orange").gameObject.SetActive(false);
            base.transform.Find("Item/TitleRare/" + MiscData.Config.RarityColor[this._itemData.rarity]).gameObject.SetActive(true);
            if (this._itemType == DropNewItemType.NormalItem)
            {
                base.transform.Find("Item/Title/DescPanel/Desc").GetComponent <Text>().text = this._itemData.GetDisplayTitle();
                base.transform.Find("Item/StigmataIcon").gameObject.SetActive(false);
                base.transform.Find("Item/3dModel").gameObject.SetActive(false);
                base.transform.Find("Item/OtherIcon").gameObject.SetActive(false);
                if (this._itemData is WeaponDataItem)
                {
                    base.transform.Find("Item/3dModel").gameObject.SetActive(true);
                    base.transform.Find("Item/3dModel").GetComponent <MonoWeaponRenderImage>().SetupView(this._itemData as WeaponDataItem, false, 0);
                }
                else if (this._itemData is StigmataDataItem)
                {
                    base.transform.Find("Item/StigmataIcon").gameObject.SetActive(true);
                    base.transform.Find("Item/StigmataIcon/Image").GetComponent <MonoStigmataFigure>().SetupView(this._itemData as StigmataDataItem);
                }
                else
                {
                    string prefabPath = !(this._itemData is EndlessToolDataItem) ? this._itemData.GetImagePath() : (this._itemData as EndlessToolDataItem).GetIconPath();
                    base.transform.Find("Item/OtherIcon").gameObject.SetActive(true);
                    base.transform.Find("Item/OtherIcon/Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(prefabPath);
                }
                string text = LocalizationGeneralLogic.GetText("Menu_Material", new object[0]);
                if (this._itemData is StigmataDataItem)
                {
                    text = LocalizationGeneralLogic.GetText("Menu_Stigmata", new object[0]);
                }
                else if (this._itemData is WeaponDataItem)
                {
                    text = LocalizationGeneralLogic.GetText("Menu_Weapon", new object[0]);
                }
                base.transform.Find("Item/Title/DescPanel/Label").GetComponent <Text>().text = text;
                Transform transform = base.transform.Find("Item/Stars");
                if (this._itemData is AvatarFragmentDataItem)
                {
                    transform.gameObject.SetActive(false);
                }
                else
                {
                    transform.gameObject.SetActive(true);
                    for (int i = 0; i < transform.childCount; i++)
                    {
                        transform.GetChild(i).gameObject.SetActive(i < this._itemData.rarity);
                    }
                }
                Color color = Miscs.ParseColor(MiscData.Config.DropItemBracketColorList[this._itemData.rarity]);
                base.transform.Find("Item/Title/DescPanel/L").GetComponent <Image>().color = color;
                base.transform.Find("Item/Title/DescPanel/R").GetComponent <Image>().color = color;
            }
            else
            {
                base.transform.Find("Item/OtherIcon/Image").GetComponent <Image>().sprite    = Miscs.GetSpriteByPrefab(this._itemData.GetImagePath());
                base.transform.Find("Item/Title/DescPanel/Label").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_AvatarCard", new object[0]);
                int avatarID = AvatarMetaDataReaderExtend.GetAvatarIDsByKey(this._itemData.ID).avatarID;
                int star     = Singleton <AvatarModule> .Instance.GetDummyAvatarDataItem(avatarID).star;

                base.transform.Find("Item/Stars/AvatarStar/1").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(MiscData.Config.AvatarStarIcons[star]);
                base.transform.Find("Item/Title/DescPanel/Desc").GetComponent <Text>().text  = Singleton <AvatarModule> .Instance.GetAvatarByID(avatarID).FullName;

                Color color2 = Miscs.ParseColor(MiscData.Config.DropItemBracketColorList[0]);
                base.transform.Find("Item/Title/DescPanel/L").GetComponent <Image>().color = color2;
                base.transform.Find("Item/Title/DescPanel/R").GetComponent <Image>().color = color2;
            }
        }
Beispiel #11
0
 public void SetupView(int comboBefore, int comboAfter)
 {
     if (comboAfter > 0)
     {
         base.transform.Find("NumText/Combo/ComboNum").GetComponent <Text>().text = comboAfter + string.Empty;
         if (comboBefore == 0)
         {
             base.transform.localScale = Vector3.one;
         }
         if (base.transform.Find("NumText").GetComponent <Animation>().isPlaying)
         {
             base.transform.Find("NumText").GetComponent <Animation>().Rewind();
         }
         base.transform.Find("NumText").GetComponent <Animation>().Play();
         int         comboEvaluation = this.GetComboEvaluation(comboAfter);
         string      str             = this._evaluationList[comboEvaluation];
         IEnumerator enumerator      = base.transform.Find("NumText/Evaluation").GetEnumerator();
         try
         {
             while (enumerator.MoveNext())
             {
                 Transform current = (Transform)enumerator.Current;
                 current.gameObject.SetActive(current.name == str);
             }
         }
         finally
         {
             IDisposable disposable = enumerator as IDisposable;
             if (disposable == null)
             {
             }
             disposable.Dispose();
         }
         base.transform.Find("NumText/Combo/ComboNumBG").GetComponent <Image>().color = Miscs.ParseColor(MiscData.Config.ComboNumFrameColor[comboEvaluation]);
     }
     else
     {
         base.transform.localScale = Vector3.zero;
     }
 }
Beispiel #12
0
        private void SetupRarityView()
        {
            string hexString = MiscData.Config.ItemRarityColorList[this.storageItem.rarity];

            base.view.transform.Find("Dialog/Content/Icon").GetComponent <Image>().color = Miscs.ParseColor(hexString);
        }