예제 #1
0
 private void CreateAppear()
 {
     if (m_Appear == null)
     {
         if (m_ChipGainType == ChipGainType.AutoGain)
         {
             m_Appear     = Global.gApp.gResMgr.InstantiateObj(EffectConfig.EffectPath[EffectConfig.WpnChipAppearAutoGain]);
             m_AppearTail = Global.gApp.gResMgr.InstantiateObj(EffectConfig.EffectPath[EffectConfig.WpnChipAppearAutoGainTail]);
             m_AppearTail.transform.SetParent(transform, false);
             transform.Find(GameConstVal.TextMeshName).gameObject.SetActive(false);
             FightUI fightUi = Global.gApp.gUiMgr.GetPanelCompent <FightUI>(Wndid.FightPanel);
             if (fightUi != null)
             {
                 RectTransform rext = fightUi.GetChipIconRectTsf();
                 m_DestPos = rext.position;
             }
             else
             {
                 m_DestPos = Vector3.zero;
             }
             Vector3 screenPoint = Camera.main.WorldToScreenPoint(transform.position);
             transform.position = UiTools.ScreenToUiWorld(screenPoint);
             m_StartPos         = transform.position;
             AddChip();
         }
         else
         {
             m_Appear = Global.gApp.gResMgr.InstantiateObj(EffectConfig.EffectPath[EffectConfig.WpnChipAppearTriggerGain]);
         }
         m_Appear.transform.SetParent(transform, false);
     }
 }
예제 #2
0
        private void ShowNormalModelAdvertisingImp()
        {
            Global.gApp.gGameCtrl.RemoveGlobalTouchMask();
            FightUI fightUI = Global.gApp.gUiMgr.GetPanelCompent <FightUI>(Wndid.FightPanel);

            if (fightUI != null)
            {
                fightUI.PauseFromAd();
            }
            FightResultManager.instance.ShowReivePopup((bool tmpR) =>
            {
                Global.gApp.CurScene.Resume();
                ResetProtectTime(1f);
                if (tmpR)
                {
                    m_ReviveTimes--;
                    m_Hp = m_MaxHp;
                    Global.gApp.gMsgDispatcher.Broadcast <float, float>(MsgIds.MainRoleHpChange, m_Hp, m_MaxHp);
                    Global.gApp.gCamCompt.GetComponentInChildren <MoveToBoss>().StartReborn();
                    m_Player.GetFight().PlayAnim(GameConstVal.Idle, GameConstVal.Idle);
                    m_Player.LockMove(0.7f);
                    m_Player.gameObject.AddComponent <DelayCallBack>().SetAction(() => { m_Player.SetColliderState(true); }, 0.7f, true);
                }
                else
                {
                    FightResultManager.instance.SetRetryType(FightResultManager.RetryType.NONE);
                    Global.gApp.CurScene.GameLose();
                }
            });
        }
예제 #3
0
 public FightAttrUiMgr(Transform parentNode, FightUI fightUi)
 {
     m_FightUI    = fightUi;
     m_ParentNode = parentNode;
     m_AttrUi     = new Dictionary <int, BaseAttrUi>();
     RegisterListeners();
 }
예제 #4
0
        public override void FreshProgress(float progress)
        {
            FightUI fightUI = Global.gApp.gUiMgr.GetPanelCompent <FightUI>(Wndid.FightPanel);

            if (fightUI == null)
            {
                return;
            }
            if (m_FightNpcProgress == null)
            {
                GameObject go = Global.gApp.gResMgr.InstantiateObj(Wndid.FightNpcProgress);
                go.transform.SetParent(fightUI.NpcProgress.rectTransform, false);
                m_FightNpcProgress = go.GetComponent <FightNpcProgress>();
                go.GetComponent <FollowNode>().SetFloowNode(GetTaskUINode());
            }
            m_FightNpcProgress.Received.image.fillAmount = progress;
            if (progress >= 1)
            {
                DG.Tweening.DOTweenAnimation[] dOTweenAnimations = m_FightNpcProgress.GetComponents <DG.Tweening.DOTweenAnimation>();
                foreach (DG.Tweening.DOTweenAnimation dOTweenAnimation in dOTweenAnimations)
                {
                    dOTweenAnimation.enabled = true;
                    dOTweenAnimation.DORestart();
                }
                Destroy(m_FightNpcProgress.gameObject, 3);
                m_FightNpcProgress = null;
            }
        }
예제 #5
0
        public void Init(float effectTime, string name, FightUI fightUi, ItemItem itemData)
        {
            m_CurTime             = 0;
            m_EffectTime          = effectTime;
            m_Name                = name;
            m_KeyName             = itemData.name;
            m_FightUi             = fightUi;
            Itemicon.image.sprite = Global.gApp.gResMgr.LoadSprite(itemData.image_time, EffectConfig.FightUiAtlas);

            if (m_Name.CompareTo("PlayerEnergyProp") == 0)
            {
                m_NeedUpdate = false;
            }
        }