private void SetupLvInfoPanel(float starDelay = 0f)
 {
     this._animationManager = new SequenceAnimationManager(new Action(this.EnableBGClick), null);
     base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(false);
     base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(false);
     base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(false);
     if (this.itemDataBefore is WeaponDataItem)
     {
         base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/3dModel").GetComponent<MonoWeaponRenderImage>().SetupView(this.itemDataAfter as WeaponDataItem, false, 0);
         this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/3dModel").GetComponent<MonoAnimationinSequence>(), null);
     }
     else if (this.itemDataBefore is StigmataDataItem)
     {
         base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent<MonoStigmataFigure>().SetupView(this.itemDataBefore as StigmataDataItem);
         this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent<MonoAnimationinSequence>(), null);
     }
     else
     {
         base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab(this.itemDataAfter.GetImagePath());
         this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent<MonoAnimationinSequence>(), null);
     }
     base.view.transform.Find("Result").GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/EquipPowerUpResult/Success" + MiscData.GetEquipPowerUpResultIndex(this.boostRate).ToString());
     this._animationManager.AddAnimation(base.view.transform.Find("Result").GetComponent<MonoAnimationinSequence>(), null);
     base.view.transform.Find("InfoRowLv").GetComponent<MonoEquipExpGrow>().SetData(this.itemDataBefore.level, this.itemDataBefore.GetMaxExp(), this.itemDataBefore.exp, this.itemDataAfter.exp, UIUtil.GetEquipmentMaxExpList(this.itemDataBefore, this.itemDataBefore.level, this.itemDataAfter.level));
     this._animationManager.AddAnimation(base.view.transform.Find("InfoRowLv").GetComponent<MonoAnimationinSequence>(), null);
     this._animationManager.StartPlay(starDelay, true);
 }
        protected override bool SetupView()
        {
            this._animationManager = new SequenceAnimationManager(null, null);
            Transform trans = base.view.transform.Find("ItemPanel");

            trans.DestroyChildren();
            for (int i = 0; i < this._storageItemList.Count; i++)
            {
Beispiel #3
0
        protected override bool SetupView()
        {
            base.view.transform.Find("Btn").gameObject.SetActive(false);
            this._animationManager = new SequenceAnimationManager(new Action(this.StartTimer), null);
            LevelScoreManager instance = Singleton <LevelScoreManager> .Instance;
            int level                = (instance == null) ? this._levelBefore_no_scoremanager : instance.playerLevelBefore;
            int teamLevel            = Singleton <PlayerModule> .Instance.playerData.teamLevel;
            PlayerLevelMetaData data = PlayerLevelMetaDataReader.TryGetPlayerLevelMetaDataByKey(level);

            SuperDebug.VeryImportantAssert(data != null, string.Format("Cannot get player level data for player level:{0}", level));
            if (data == null)
            {
                data = PlayerLevelMetaDataReader.TryGetPlayerLevelMetaDataByKey(1);
            }
            base.view.transform.Find("Dialog/Content/LevelInfo/LvBefore/Lv").GetComponent <Text>().text = level.ToString();
            base.view.transform.Find("Dialog/Content/LevelInfo/LvAfter/Lv").GetComponent <Text>().text  = teamLevel.ToString();
            int       maxStamina = Singleton <PlayerModule> .Instance.playerData.MaxStamina;
            int       stamina    = data.stamina;
            Transform transform  = base.view.transform.Find("Dialog/Content/MaxStamina");

            if (maxStamina > stamina)
            {
                transform.gameObject.SetActive(true);
                transform.Find("Num").GetComponent <Text>().text    = maxStamina.ToString();
                transform.Find("AddNum").GetComponent <Text>().text = "+" + ((maxStamina - stamina)).ToString();
            }
            else
            {
                transform.gameObject.SetActive(false);
            }
            int       avatarLevelLimit = Singleton <PlayerModule> .Instance.playerData.AvatarLevelLimit;
            int       num6             = data.avatarLevelLimit;
            Transform transform2       = base.view.transform.Find("Dialog/Content/MaxAvatarLevel");

            if (avatarLevelLimit > num6)
            {
                transform2.gameObject.SetActive(true);
                transform2.Find("Num").GetComponent <Text>().text    = avatarLevelLimit.ToString();
                transform2.Find("AddNum").GetComponent <Text>().text = "+" + ((avatarLevelLimit - num6)).ToString();
            }
            else
            {
                transform2.gameObject.SetActive(false);
            }
            RectTransform component   = base.view.transform.Find("Dialog").GetComponent <RectTransform>();
            List <string> newFeatures = MiscData.GetNewFeatures(level, teamLevel);

            for (int i = 0; i < newFeatures.Count; i++)
            {
                string     text = LocalizationGeneralLogic.GetText(newFeatures[i], new object[0]);
                GameObject obj2 = UnityEngine.Object.Instantiate <GameObject>(Miscs.LoadResource <GameObject>("UI/Menus/Widget/Map/NewFeature", BundleType.RESOURCE_FILE));
                obj2.transform.SetParent(component.Find("Content"), false);
                obj2.transform.Find("FeatureName").GetComponent <Text>().text = text;
            }
            this._animationManager.AddAllChildrenInTransform(base.view.transform.Find("Dialog/Content"));
            base.view.transform.Find("Dialog").GetComponent <MonoDialogHeightGrow>().PlayGrow(new Action(this.OnDialogBGGrowEnd));
            return(false);
        }
Beispiel #4
0
 protected override bool SetupView()
 {
     this._animationManager = new SequenceAnimationManager(null, null);
     this.SetupScrollView();
     this.SetupDetail();
     this._animationManager.AddAnimation(base.view.transform.Find("Dialog/Content/CompleteIcon").GetComponent <MonoAnimationinSequence>(), null);
     this._animationManager.StartPlay(0.5f, false);
     return(false);
 }
 private void InitAnimationAndDialogManager()
 {
     this._leftPanelAnimationManager = new SequenceAnimationManager(new Action(this.OnLeftPanelAnimationsEnd), null);
     this._playerLevelUpAndAvatarNewSkillDialogManager = new SequenceDialogManager(new Action(this.OnPlayerAvatarDialogsEnd));
     this._dropPanelBGAnimationManager = new SequenceAnimationManager(new Action(this.OnDropPanelBGAniamtionEnd), null);
     this._dropNewItemDialogManager    = new SequenceDialogManager(new Action(this.OnDropNewItemDialogsEnd));
     this._dropItemAnimationManager    = new SequenceAnimationManager(new Action(this.OnItemPanelAnimationEnd), null);
     this._dropScroller            = base.view.transform.Find("RewardPanel/DropPanel/Drops/ScrollView").GetComponent <MonoGridScroller>();
     this._leftPanelAnimationsEnd  = false;
     this._playerAvatarDialogsEnd  = false;
     this._dropPanelBGAniamtionEnd = false;
 }
Beispiel #6
0
        protected override bool SetupView()
        {
            this._animationManager = new SequenceAnimationManager(null, null);
            this.SetupTitle();
            this.InitRewardList();
            this.SetupContents();
            this._animationManager.AddAnimation(base.view.transform.Find("Dialog/Content/CompleteIcon").GetComponent <MonoAnimationinSequence>(), null);
            this._animationManager.StartPlay(0.5f, true);
            Singleton <NetworkManager> .Instance.RequestHasGotItemIdList();

            return(false);
        }
Beispiel #7
0
        private void SetupRedeemInfo()
        {
            base.view.transform.Find("Dialog/Content/Error").gameObject.SetActive(false);
            base.view.transform.Find("Dialog/Content/Info").gameObject.SetActive(true);
            base.view.transform.Find("Dialog/Content/Complete").gameObject.SetActive(false);
            Transform transform = base.view.transform.Find("Dialog/Content/Info");

            transform.Find("SubTitle").GetComponent <Text>().text = this._redeemInfo.get_desc();
            this.SetupRewardList();
            transform.Find("ScrollView").GetComponent <MonoGridScroller>().Init(new MonoGridScroller.OnChange(this.OnScrollChange), this._redeemRewardList.Count, new Vector2(0f, 0f));
            this._animationManager = new SequenceAnimationManager(null, null);
            this._animationManager.AddAllChildrenInTransform(transform.Find("ScrollView/Content"));
            this._animationManager.StartPlay(0.1f, true);
        }
Beispiel #8
0
        protected override bool SetupView()
        {
            this._animationManager = new SequenceAnimationManager(new Action(this.StartTimer), null);
            base.view.transform.Find("Dialog/Content/AnimMoveIn1/Portrait").GetComponent <Image>().sprite   = Miscs.GetSpriteByPrefab(this._avatarData.IconPath);
            base.view.transform.Find("Dialog/Content/AnimMoveIn2/NameRow/Title").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_Title_UnlockNewAvatar", new object[0]);
            base.view.transform.Find("Dialog/Content/AnimMoveIn2/NameRow/ClassName/FirstName").GetComponent <Text>().text = this._avatarData.ClassFirstName;
            base.view.transform.Find("Dialog/Content/AnimMoveIn2/NameRow/ClassName/LastName").GetComponent <Text>().text  = this._avatarData.ClassLastName;
            base.view.transform.Find("Dialog/Content/AnimMoveIn3/AvatarStar").GetComponent <MonoAvatarStar>().SetupView(this._avatarData.star);
            base.view.transform.Find("Dialog/Content/AnimMoveIn3/ShortNameRow/SmallIcon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(this._avatarData.AttributeIconPath);
            Text component = base.view.transform.Find("Dialog/Content/AnimMoveIn3/ShortNameRow/ShortName").GetComponent <Text>();

            component.text  = this._avatarData.ShortName;
            component.color = this.GetFontColorByAttribute(this._avatarData.Attribute);
            this._animationManager.AddAllChildrenInTransform(base.view.transform.Find("Dialog/Content"));
            base.view.transform.Find("Dialog").GetComponent <MonoDialogHeightGrow>().PlayGrow(new Action(this.OnDialogBGGrowEnd));
            base.view.transform.Find("ClipZone").gameObject.SetActive(this._enableClipZone);
            return(false);
        }
 protected override bool SetupView()
 {
     this._animationManager = new SequenceAnimationManager(null, null);
     foreach (ParticleSystem system in base.view.transform.Find("ItemPanel/Effects").GetComponentsInChildren<ParticleSystem>())
     {
         system.Stop();
     }
     foreach (ParticleSystem system2 in base.view.transform.Find("Result").GetComponentsInChildren<ParticleSystem>())
     {
         system2.Stop();
     }
     base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(false);
     base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(false);
     base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(false);
     base.view.transform.Find("SkillPopup").gameObject.SetActive(false);
     if (this.itemDataBefore is WeaponDataItem)
     {
         base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/3dModel").GetComponent<MonoWeaponRenderImage>().SetupView(this.itemDataBefore as WeaponDataItem, false, 0);
     }
     else if (this.itemDataBefore is StigmataDataItem)
     {
         base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent<MonoStigmataFigure>().SetupView(this.itemDataBefore as StigmataDataItem);
     }
     else
     {
         base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab(this.itemDataBefore.GetImagePath());
     }
     this.SetupMaterialList();
     base.view.transform.Find("Button").gameObject.SetActive(false);
     base.view.transform.Find("StarBG").GetComponent<CanvasGroup>().alpha = 0f;
     this._effectIndex = 0;
     base.view.transform.Find("StigmataAffixInfo").gameObject.SetActive(false);
     return false;
 }
Beispiel #10
0
        protected override bool SetupView()
        {
            this._animationManager = new SequenceAnimationManager(new Action(this.StartTimer), null);
            Transform transform = base.view.transform.Find("Dialog/Content/AnimMoveIn3/AchieveName");

            if ((transform != null) && (this._missionData != null))
            {
                transform.GetComponent <Text>().text = LocalizationGeneralLogic.GetText(this._missionData.metaData.title, new object[0]);
            }
            this._animationManager.AddAllChildrenInTransform(base.view.transform.Find("Dialog/Content"));
            GameObject gameObject = base.view.transform.Find("Dialog/Content/AnimMoveIn1/AchieveIcon").gameObject;

            if (!string.IsNullOrEmpty(this._missionData.metaData.thumb) && (gameObject != null))
            {
                GameObject obj3 = Resources.Load <GameObject>(this._missionData.metaData.thumb);
                if (obj3 != null)
                {
                    gameObject.transform.Find("BG").GetComponent <Image>().sprite   = obj3.transform.Find("BG").GetComponent <Image>().sprite;
                    gameObject.transform.Find("Icon").GetComponent <Image>().sprite = obj3.transform.Find("Icon").GetComponent <Image>().sprite;
                }
            }
            this._animationManager.StartPlay(0f, false);
            return(false);
        }
Beispiel #11
0
 private void InitAnimationAndDialogManager()
 {
     this._dropItemAnimationManager = new SequenceAnimationManager(new Action(this.OnDropItemAnimationEnd), null);
     this._dropScroller             = base.view.transform.Find("GroupPanel/Drops/ScrollView").GetComponent <MonoGridScroller>();
 }
 private void SetupTitleAndStar(float delay = 0f, bool showAfterItem = false)
 {
     base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(false);
     base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(false);
     base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(false);
     this._animationManager = new SequenceAnimationManager(new Action(this.EnableBGClick), null);
     if (this.itemDataBefore is WeaponDataItem)
     {
         base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/3dModel").GetComponent<MonoWeaponRenderImage>().SetupView(this.itemDataAfter as WeaponDataItem, false, 0);
         this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/3dModel").GetComponent<MonoAnimationinSequence>(), null);
     }
     else if (this.itemDataBefore is StigmataDataItem)
     {
         base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent<MonoStigmataFigure>().SetupView(this.itemDataAfter as StigmataDataItem);
         this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent<MonoAnimationinSequence>(), null);
     }
     else
     {
         base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(true);
         base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab(this.itemDataAfter.GetImagePath());
         this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent<MonoAnimationinSequence>(), null);
     }
     base.view.transform.Find("Title").gameObject.SetActive(false);
     base.view.transform.Find("Result").GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/EquipPowerUpResult/Success4");
     this._animationManager.AddAnimation(base.view.transform.Find("Result").GetComponent<MonoAnimationinSequence>(), null);
     this._animationManager.AddAnimation(base.view.transform.Find("StarBG").GetComponent<MonoAnimationinSequence>(), null);
     Transform transform = base.view.transform.Find("Stars");
     for (int i = 0; i < transform.childCount; i++)
     {
         Transform child = transform.GetChild(i);
         child.gameObject.SetActive(i < this.itemDataAfter.GetMaxRarity());
         if (i < this.itemDataAfter.GetMaxRarity())
         {
             child.GetComponent<Image>().color = MiscData.GetColor("RarityStarGrey");
             child.GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/StarBigGray");
             child.GetComponent<CanvasGroup>().alpha = 1f;
             if (i < this.itemDataAfter.rarity)
             {
                 this._animationManager.AddAnimation(child.GetComponent<MonoAnimationinSequence>(), new Action<Transform>(this.SetStarColor));
                 child.GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/StarBig");
             }
         }
     }
     Transform transform3 = base.view.transform.Find("StarsMini");
     if (this.itemDataAfter.GetMaxSubRarity() > 0)
     {
         this._animationManager.AddAnimation(transform3.GetComponent<MonoAnimationinSequence>(), null);
     }
     for (int j = 0; j < transform3.childCount; j++)
     {
         Transform transform4 = transform3.GetChild(j);
         transform4.gameObject.SetActive(j < (this.itemDataAfter.GetMaxSubRarity() - 1));
         if (j < (this.itemDataAfter.GetMaxSubRarity() - 1))
         {
             transform4.GetComponent<Image>().color = MiscData.GetColor("RarityStarGrey");
             transform4.GetComponent<CanvasGroup>().alpha = 1f;
             transform4.GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/SubStarActiveGray");
             if (j < this.itemDataAfter.GetSubRarity())
             {
                 this._animationManager.AddAnimation(transform4.GetComponent<MonoAnimationinSequence>(), new Action<Transform>(this.SetStarColor));
                 transform4.GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/SubStarActive");
             }
         }
     }
     this._animationManager.StartPlay(delay, true);
 }
        protected override bool SetupView()
        {
            this._animationManager = new SequenceAnimationManager(null, null);
            base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(false);
            base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(false);
            base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(false);
            if (this._storageItem is WeaponDataItem)
            {
                base.view.transform.Find("ItemPanel/3dModel").gameObject.SetActive(true);
                base.view.transform.Find("ItemPanel/3dModel").GetComponent <MonoWeaponRenderImage>().SetupView(this._storageItem as WeaponDataItem, false, 0);
                this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/3dModel").GetComponent <MonoAnimationinSequence>(), null);
            }
            else if (this._storageItem is StigmataDataItem)
            {
                base.view.transform.Find("ItemPanel/StigmataIcon").gameObject.SetActive(true);
                base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent <MonoStigmataFigure>().SetupView(this._storageItem as StigmataDataItem);
                this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/StigmataIcon/Image").GetComponent <MonoAnimationinSequence>(), null);
            }
            else
            {
                string prefabPath = !(this._storageItem is EndlessToolDataItem) ? this._storageItem.GetImagePath() : (this._storageItem as EndlessToolDataItem).GetIconPath();
                base.view.transform.Find("ItemPanel/OtherIcon").gameObject.SetActive(true);
                base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(prefabPath);
                this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/OtherIcon/Image").GetComponent <MonoAnimationinSequence>(), null);
            }
            base.view.transform.Find("NewAvatarEffect/Green").gameObject.SetActive(false);
            base.view.transform.Find("NewAvatarEffect/Blue").gameObject.SetActive(false);
            base.view.transform.Find("NewAvatarEffect/Purple").gameObject.SetActive(false);
            base.view.transform.Find("NewAvatarEffect/Orange").gameObject.SetActive(false);
            base.view.transform.Find("NewAvatarEffect/" + MiscData.Config.RarityColor[this._storageItem.rarity]).gameObject.SetActive(true);
            if (!this._onlyShow)
            {
                base.view.transform.Find("ItemPanel/Title/DescPanel/Desc").GetComponent <Text>().text = this._storageItem.GetDisplayTitle();
                this._animationManager.AddAnimation(base.view.transform.Find("ItemPanel/Title").GetComponent <MonoAnimationinSequence>(), null);
                Transform trans = base.view.transform.Find("ItemPanel/Stars");
                if ((this._storageItem is AvatarFragmentDataItem) || (this._storageItem is AvatarCardDataItem))
                {
                    trans.gameObject.SetActive(false);
                }
                else
                {
                    trans.gameObject.SetActive(true);
                    for (int i = 0; i < trans.childCount; i++)
                    {
                        Transform child = trans.GetChild(i);
                        child.gameObject.SetActive(i < this._storageItem.rarity);
                        if (i < this._storageItem.rarity)
                        {
                            bool flag = this._storageItem is AvatarCardDataItem;
                            child.Find("1").gameObject.SetActive(!flag);
                            child.Find("2").gameObject.SetActive(flag);
                        }
                    }
                    this._animationManager.AddAllChildrenInTransform(trans);
                }
            }
            this._animationManager.StartPlay(0f, false);
            if (((this._timer != null) && (Singleton <TutorialModule> .Instance != null)) && !Singleton <TutorialModule> .Instance.IsInTutorial)
            {
                this._timer.StartRun(false);
            }
            AvatarCardDataItem item = this._storageItem as AvatarCardDataItem;

            if ((item != null) && !item.IsSplite())
            {
                AvatarUnlockDialogContext dialogContext = new AvatarUnlockDialogContext(AvatarMetaDataReaderExtend.GetAvatarIDsByKey(item.ID).avatarID, true);
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
            }
            this.PostOpenningAudioEvent();
            return(false);
        }