Exemple #1
0
 /// <summary>
 /// 还原面板元素
 /// </summary>
 private void ResetObjCondition()
 {
     isCheckSkin = false;
     Bg2.gameObject.CustomSetActive(false);
     TextureTween.ResetToBeginning();
     BlockBg.ResetToBeginning();
     AttrObj.CustomSetActive(false);
     LifeShowTween.gameObject.CustomSetActive(false);
     AttackShowTween.gameObject.CustomSetActive(false);
     SpeedShowTween.gameObject.CustomSetActive(false);
     DefShowTween.gameObject.CustomSetActive(false);
     SkillAwakeObj.CustomSetActive(false);
     AttriExtralAddObj.CustomSetActive(false);
     SkinObj.CustomSetActive(false);
     JumpTweenObj.CustomSetActive(false);
     OnClickTipObj.CustomSetActive(false);
 }
Exemple #2
0
        /// <summary>
        /// 点击跳过按钮
        /// </summary>
        public void OnClickJumpTween()
        {
            StopAllCoroutines();
            JumpTweenObj.CustomSetActive(false);
            if (!string.IsNullOrEmpty(curTemplate.awakeSkin) && isCheckSkin == false)
            {
                LTPartnerDataManager.Instance.PartnerUseAwakeSkin(curpartnerData.HeroId, 1, MainLandLogic.GetInstance().SceneId, delegate(bool isccuess)
                {
                    if (isccuess)
                    {
                        curpartnerData = LTPartnerDataManager.Instance.RefreshSkinData(curpartnerData.HeroId);
                        Hotfix_LT.Data.HeroInfoTemplate info = curpartnerData.HeroInfo;
                        StartCoroutine(CreateBuddyModel(ShowLobbyTexture, info.model_name, false, false));
                        SetPartnerStar(curpartnerData.IsAwaken);
                        //修改伙伴界面显示
                        Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
                        //设置领队
                        if (curpartnerData.StatId == LTMainHudManager.Instance.UserLeaderTID)
                        {
                            if (!AllianceUtil.IsInTransferDart)
                            {
                                Hotfix_LT.Messenger.Raise("SetLeaderEvent");
                            }
                        }
                    }
                });
            }
            else
            {
                SetPartnerStar(curpartnerData.IsAwaken);
                StartCoroutine(CreateBuddyModel(ShowLobbyTexture, curpartnerData.HeroInfo.model_name, false, false));
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
            }
            Bg2.gameObject.CustomSetActive(true);
            BgSprite.color = new Color(1, 1, 1, 1);
            Fx_Hit.CustomSetActive(false);
            FX_Cast.CustomSetActive(false);
            SetPowerShow();
            TextureTween.PlayForward();
            AttrObj.CustomSetActive(true);
            LifeShowTween.gameObject.CustomSetActive(true);
            AttackShowTween.gameObject.CustomSetActive(true);
            SpeedShowTween.gameObject.CustomSetActive(true);
            DefShowTween.gameObject.CustomSetActive(true);
            if (!string.IsNullOrEmpty(curTemplate.awakeSkin))
            {
                SkinObj.CustomSetActive(true);
                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithSkin, 0);
            }
            else
            {
                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithoutSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithoutSkin, 0);
            }
            if (curTemplate.awakeType == 1)
            {
                SkillAwakeObj.CustomSetActive(true);
            }
            else
            {
                AttriExtralAddObj.gameObject.CustomSetActive(true);
            }

            OnClickTipObj.CustomSetActive(true);
            canClose = true;
        }
Exemple #3
0
        /// <summary>
        /// 动画序列
        /// </summary>
        /// <returns></returns>
        private IEnumerator PlayAwakenTween()
        {
            JumpTweenObj.CustomSetActive(true);
            FX_Cast.CustomSetActive(true);
            yield return(new WaitForSeconds(3.0f));

            Fx_Hit.CustomSetActive(true);
            yield return(new WaitForSeconds(0.2f));

            //切换皮肤
            if (!string.IsNullOrEmpty(curTemplate.awakeSkin))
            {
                LTPartnerDataManager.Instance.PartnerUseAwakeSkin(curpartnerData.HeroId, 1, MainLandLogic.GetInstance().SceneId, delegate(bool isccuess)
                {
                    if (isccuess)
                    {
                        curpartnerData = LTPartnerDataManager.Instance.RefreshSkinData(curpartnerData.HeroId);
                        Hotfix_LT.Data.HeroInfoTemplate info = curpartnerData.HeroInfo;
                        StartCoroutine(CreateBuddyModel(ShowLobbyTexture, info.model_name, false, true));
                        SetPartnerStar(curpartnerData.IsAwaken);
                        //修改伙伴界面显示
                        Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
                        //设置领队
                        if (curpartnerData.StatId == LTMainHudManager.Instance.UserLeaderTID)
                        {
                            if (!AllianceUtil.IsInTransferDart)
                            {
                                Hotfix_LT.Messenger.Raise("SetLeaderEvent");
                            }
                        }
                        isCheckSkin = true;
                    }
                });
            }
            else
            {
                SetPartnerStar(curpartnerData.IsAwaken);
                StartCoroutine(CreateBuddyModel(ShowLobbyTexture, curpartnerData.HeroInfo.model_name, false, true));
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, curpartnerData);
            }
            yield return(new WaitForSeconds(1.2f));

            Fx_Hit.CustomSetActive(false);
            FX_Cast.CustomSetActive(false);
            SetPowerShow();
            yield return(new WaitForSeconds(TextureTween.duration));

            yield return(new WaitForSeconds(1.2f));

            TextureTween.ResetToBeginning();
            TextureTween.PlayForward();
            BlockBg.PlayForward();
            Bg2.ResetToBeginning();
            Bg2.gameObject.CustomSetActive(true);
            Bg2.PlayForward();
            yield return(new WaitForSeconds(TextureTween.duration));

            //播放属性加成
            if (string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 1)
            {
                AttriBg.height = 839;
            }
            else if (!string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 2)
            {
                AttriBg.height = 759;
            }
            else if (!string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 1)
            {
                AttriBg.height = 975;
            }
            else if (string.IsNullOrEmpty(curTemplate.awakeSkin) && curTemplate.awakeType == 2)
            {
                AttriBg.height = 759;
            }

            AttrObj.CustomSetActive(true);
            LifeShowTween.ResetToBeginning();
            LifeShowTween.gameObject.CustomSetActive(true);
            LifeShowTween.PlayForward();
            yield return(DelayTimes);

            AttackShowTween.ResetToBeginning();
            AttackShowTween.gameObject.CustomSetActive(true);
            AttackShowTween.PlayForward();
            yield return(DelayTimes);

            DefShowTween.ResetToBeginning();
            DefShowTween.gameObject.CustomSetActive(true);
            DefShowTween.PlayForward();
            yield return(DelayTimes);

            SpeedShowTween.ResetToBeginning();
            SpeedShowTween.gameObject.CustomSetActive(true);
            SpeedShowTween.PlayForward();
            yield return(DelayTimes);

            if (!string.IsNullOrEmpty(curTemplate.awakeSkin))
            {
                SkinObj.transform.GetComponent <TweenScale>().ResetToBeginning();
                SkinObj.CustomSetActive(true);
                SkinObj.transform.GetComponent <TweenScale>().PlayForward();
                yield return(DelayTimes);

                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithSkin, 0);
            }
            else
            {
                AttriExtralAddObj.transform.localPosition = new Vector3(621, attriAddObjPosWithoutSkin, 0);
                SkillAwakeObj.transform.localPosition     = new Vector3(621, skillObjPosWithoutSkin, 0);
            }
            if (curTemplate.awakeType == 1)
            {
                SkillAwakeObj.transform.GetComponent <TweenScale>().ResetToBeginning();
                SkillAwakeObj.CustomSetActive(true);
                SkillAwakeObj.transform.GetComponent <TweenScale>().PlayForward();
            }
            else
            {
                AttriExtralAddObj.transform.GetComponent <TweenScale>().ResetToBeginning();
                AttriExtralAddObj.gameObject.CustomSetActive(true);
                AttriExtralAddObj.transform.GetComponent <TweenScale>().PlayForward();
            }
            yield return(DelayTimes);

            //SkinGetTip.gameObject.CustomSetActive(true);
            OnClickTipObj.CustomSetActive(true);
            JumpTweenObj.CustomSetActive(false);
            canClose = true;
            yield return(null);
        }