void AddParticle(bool add)
    {
        UIParticleWidget p = Particle.GetComponent <UIParticleWidget>();

        if (p == null)
        {
            p       = Particle.gameObject.AddComponent <UIParticleWidget>();
            p.depth = 100;
        }
        if (add)
        {
            if (p != null)
            {
                p.SetDimensions(1, 1);
                p.ReleaseParticle();
                p.AddParticle(50025);
            }
        }
        else
        {
            if (p != null)
            {
                p.ReleaseParticle();
            }
        }
    }
Exemple #2
0
    /// <summary>
    /// 称号展示
    /// </summary>
    void InitTitleDisplay(TitleDataBase titleDataBase)
    {
        if (m_titleDataBase.UIState == 0)
        {
            m_label_TitleLabel.gameObject.SetActive(true);
            m_trans_TitleFx.gameObject.SetActive(false);
            m_label_TitleLabel.text = titleDataBase.TextUI;
        }

        if (m_titleDataBase.UIState == 1)
        {
            m_label_TitleLabel.gameObject.SetActive(false);
            m_trans_TitleFx.gameObject.SetActive(true);

            uint fxId = m_titleDataBase.FxUI;

            //特效
            UIParticleWidget wight = m_trans_TitleFx.GetComponent <UIParticleWidget>();
            if (null == wight)
            {
                wight       = m_trans_TitleFx.gameObject.AddComponent <UIParticleWidget>();
                wight.depth = 100;
            }

            if (wight != null)
            {
                wight.ReleaseParticle();
                wight.AddParticle(fxId);
            }
        }
    }
Exemple #3
0
    void ControlMainBtnParticle(Transform parent, bool bShow)
    {
        if (parent != null)
        {
            Transform effect = parent.Find("effect");
            if (effect)
            {
                UIParticleWidget wight = effect.GetComponent <UIParticleWidget>();

                if (wight == null)
                {
                    wight       = effect.gameObject.AddComponent <UIParticleWidget>();
                    wight.depth = 20;
                }
                if (wight != null)
                {
                    wight.SetDimensions(1, 1);
                    wight.ReleaseParticle();
                    if (bShow)
                    {
                        wight.AddParticle(50040);
                    }
                    m_initMainPanel = bShow;
                }
            }
        }
    }
Exemple #4
0
    void SetHttpDownPoint()
    {
        if (KDownloadInstance.Instance().GetTakeReward() == false)
        {
            stShowMainPanelRedPoint st = new stShowMainPanelRedPoint()
            {
                modelID   = (int)WarningEnum.HttpDown,
                direction = (int)WarningDirection.None,
                bShowRed  = true,
            };
            Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.MAINPANEL_SHOWREDWARING, st);
        }
        else
        {
        }

        Transform gmTrans = m_trans_AnchorTopRight.Find("XiaZai");

        if (gmTrans)
        {
            //gmTrans.gameObject.SetActive(true);
            UIParticleWidget p = gmTrans.GetComponent <UIParticleWidget>();
            if (p == null)
            {
                p       = gmTrans.gameObject.AddComponent <UIParticleWidget>();
                p.depth = 20;
            }
            if (p != null)
            {
                p.SetDimensions(150, 50);
                p.ReleaseParticle();
                p.AddParticle(50040);
            }
        }
    }
Exemple #5
0
    /// <summary>
    /// 添加流光特效
    /// </summary>
    /// <param name="b"></param>
    public void SetEffect(bool b)
    {
        if (b)
        {
            m_effectRoot.SetActive(true);
            m_effectRoot.transform.localPosition = new Vector3(130, -26.5f - (m_nHeight - 56) * 0.5f, 0);
            m_effectRoot.transform.localScale    = new Vector3(1, m_nHeight / 56.0f, 1);

            //特效
            UIParticleWidget wight = m_effectRoot.GetComponent <UIParticleWidget>();
            if (null == wight)
            {
                wight       = m_effectRoot.AddComponent <UIParticleWidget>();
                wight.depth = 100;
            }

            if (wight != null)
            {
                wight.SetDimensions(1, 1);
                wight.ReleaseParticle();
                wight.AddParticle(50026);
            }
        }
        else
        {
            m_effectRoot.SetActive(false);
        }
    }
Exemple #6
0
 public void ResetEvolveAnim()
 {
     m_bEvolveAnimEnable = false;
     //进化动画组件重置
     if (null != m_evolveStarBoomParticleWidget)
     {
         m_evolveStarBoomParticleWidget.ReleaseParticle();
     }
     if (null != m_evolveTargetParticleWidget)
     {
         m_evolveTargetParticleWidget.ReleaseParticle();
     }
     if (null != m_dicParticleWidgets)
     {
         var iemurator = m_dicParticleWidgets.GetEnumerator();
         while (iemurator.MoveNext())
         {
             if (null == iemurator.Current.Value)
             {
                 continue;
             }
             iemurator.Current.Value.ReleaseParticle();
         }
     }
 }
Exemple #7
0
    /// <summary>
    /// 自动挂机特效
    /// </summary>
    void PlayRobotEffect(bool isShow)
    {
        //特效
        UIParticleWidget wight = m_trans_robotEffectRoot.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m_trans_robotEffectRoot.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (isShow)
        {
            //1、挂机特效
            m_trans_robotEffectRoot.gameObject.SetActive(true);
            m_trans_pathEffectRoot.gameObject.SetActive(false);
            m_label_tipsLabelRoot.gameObject.SetActive(false);

            if (wight != null)
            {
                wight.ReleaseParticle();
                wight.AddParticle(50022);
            }

            //2、 挂机按钮状态
            if (m_spriteEx_btnAutoFight != null)
            {
                m_spriteEx_btnAutoFight.ChangeSprite(2);
            }
        }
        else
        {
            //1、释放特效
            m_trans_robotEffectRoot.gameObject.SetActive(false);
            if (wight != null)
            {
                wight.ReleaseParticle();
            }

            //2、 挂机按钮状态
            if (m_spriteEx_btnAutoFight != null)
            {
                m_spriteEx_btnAutoFight.ChangeSprite(1);
            }
        }
    }
Exemple #8
0
 /// <summary>
 /// 释放所有正在执行的展示效果
 /// </summary>
 private void ReleaseAllDisplayEffect()
 {
     ResetMapDisplay();
     if (null != m_paritcle)
     {
         m_paritcle.ReleaseParticle();
     }
     ReleaseAllTips();
 }
Exemple #9
0
    IEnumerator DelayToCloseCopyTargetEffect(float delay)
    {
        yield return(new WaitForSeconds(delay));

        UIParticleWidget p = m_trans_copyTargetEffectRoot.GetComponent <UIParticleWidget>();

        if (p != null)
        {
            p.ReleaseParticle();
        }
    }
Exemple #10
0
 public void AddEffectInSkillPanel()
 {
     if (particle != null)
     {
         if (particle != null)
         {
             particle.SetDimensions(1, 1);
             particle.ReleaseParticle();
             particle.AddParticle(50023);
         }
     }
 }
Exemple #11
0
 public override void Release(bool depthRelease = true)
 {
     base.Release(depthRelease);
     if (m_goSelect != null)
     {
         UIParticleWidget p = m_goSelect.GetComponent <UIParticleWidget>();
         if (p != null)
         {
             p.ReleaseParticle();
         }
     }
 }
Exemple #12
0
    void CleanPathEffect()
    {
        if (m_trans_pathEffectRoot.gameObject.activeSelf)
        {
            m_trans_pathEffectRoot.gameObject.SetActive(false);

            UIParticleWidget wight = m_trans_pathEffectRoot.GetComponent <UIParticleWidget>();
            if (null != wight)
            {
                wight.ReleaseParticle();
            }
        }
    }
Exemple #13
0
    void AddEffect(bool show)
    {
        UIParticleWidget p = m_trans_Particle.GetComponent <UIParticleWidget>();

        if (p == null)
        {
            p       = m_trans_Particle.gameObject.AddComponent <UIParticleWidget>();
            p.depth = 20;
        }
        if (p != null)
        {
            if (show)
            {
                p.SetDimensions(80, 80);
                p.ReleaseParticle();
                p.AddParticle(50013);
            }
            else
            {
                p.ReleaseParticle();
            }
        }
    }
    void ShowEffect(uint effectID)
    {
        UIParticleWidget p = m_trans_redeffect.GetComponent <UIParticleWidget>();

        if (p == null)
        {
            p       = m_trans_redeffect.gameObject.AddComponent <UIParticleWidget>();
            p.depth = 100;
        }
        if (p != null)
        {
            p.ReleaseParticle();
            p.AddParticle(effectID);
        }
    }
Exemple #15
0
    /// <summary>
    /// 已经领奖励  hadGotReward
    /// </summary>
    /// <param name="hadGotReward"></param>
    void RefreshBtnStatus()
    {
        //完成首充了
        bool afterFirstRechage = DataManager.Manager <Mall_HuangLingManager>().AlreadyFirstRecharge.Count > 0;
        bool hadGotReward      = DataManager.Manager <ActivityManager>().HadGotFirstRechargeReward;

        m_btn_btn_recharge.gameObject.SetActive(!afterFirstRechage);
        m_btn_btn_getReward.gameObject.SetActive(afterFirstRechage);
        if (afterFirstRechage)
        {
            UIParticleWidget p = m_btn_btn_getReward.GetComponent <UIParticleWidget>();
            if (p == null)
            {
                p       = m_btn_btn_getReward.gameObject.AddComponent <UIParticleWidget>();
                p.depth = 20;
            }

            if (hadGotReward)
            {
                if (p != null)
                {
                    p.ReleaseParticle();
                }
            }
            else
            {
                //播放特效
                if (p != null)
                {
                    p.SetDimensions(180, 54);
                    p.ReleaseParticle();
                    p.AddRoundParticle();
                }
            }
        }
    }
Exemple #16
0
    /// <summary>
    /// 鱼icon特效
    /// </summary>
    void PlayFishIconEffect()
    {
        UIParticleWidget wight = m__icon.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m__icon.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (wight != null)
        {
            wight.ReleaseParticle();
            wight.AddParticle(50044);
        }
    }
Exemple #17
0
    /// <summary>
    /// //通关特效
    /// </summary>
    void AddEffect()
    {
        UIParticleWidget wight = m_trans_effectRoot.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m_trans_effectRoot.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (wight != null)
        {
            wight.ReleaseParticle();
            wight.AddParticle(50050);
        }
    }
Exemple #18
0
    /// <summary>
    /// 上鱼圆圈特效
    /// </summary>
    void PlayCircleEffect()
    {
        UIParticleWidget wight = m_btn_StartFishingBtn.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m_btn_StartFishingBtn.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (wight != null)
        {
            wight.ReleaseParticle();
            wight.AddParticle(50045);
        }
    }
Exemple #19
0
 void AddParticle()
 {
     if (m_trans_Particle != null)
     {
         if (particle == null)
         {
             particle       = m_trans_Particle.gameObject.AddComponent <UIParticleWidget>();
             particle.depth = 20;
         }
         if (particle != null)
         {
             particle.ReleaseParticle();
             particle.SetDimensions(1, 1);
             particle.AddParticle(50049);
         }
     }
 }
Exemple #20
0
    /// <summary>
    /// 宝箱领取提示特效
    /// </summary>
    void PlayEffect()
    {
        //特效
        UIParticleWidget wight = m_btn_BoxOpen.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m_btn_BoxOpen.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (wight != null)
        {
            wight.ReleaseParticle();
            wight.AddParticle(50035);
        }
    }
Exemple #21
0
    private void SetBottomBtnLable(QuestTraceInfo taskInfo)
    {
        TaskProcess process = taskInfo.GetTaskProcess();

        if (process == TaskProcess.TaskProcess_None)
        {
            m_label_btn_bottom_Label.text = "接取";
        }
        else if (process == TaskProcess.TaskProcess_Doing)
        {
            m_label_btn_bottom_Label.text = "放弃";
        }
        else if (process == TaskProcess.TaskProcess_CanDone)
        {
            //开启自动完成
            if (taskInfo.QuestTable.dwAutoCanDone)
            {
                TimerAxis.Instance().KillTimer(MISSIONCANDONE_TIMER, this);
                TimerAxis.Instance().SetTimer(MISSIONCANDONE_TIMER, 1000, this);

                missionCanDoneBtnCd = CONST_MissionCanDoneBtnCd;
                string btnDes = string.Format("完成({0})", missionCanDoneBtnCd);
                m_label_btn_bottom_Label.text = btnDes;
            }
            else
            {
                if (TimerAxis.Instance().IsExist(MISSIONCANDONE_TIMER, this))
                {
                    TimerAxis.Instance().KillTimer(MISSIONCANDONE_TIMER, this);
                }
                m_label_btn_bottom_Label.text = "完成";
            }
            UIParticleWidget p = m_btn_btn_bottom.GetComponent <UIParticleWidget>();
            if (p == null)
            {
                p       = m_btn_btn_bottom.gameObject.AddComponent <UIParticleWidget>();
                p.depth = 20;
            }
            if (p != null)
            {
                p.SetDimensions(260, 54);
                p.ReleaseParticle();
                p.AddRoundParticle();
            }
        }
    }
Exemple #22
0
 /// <summary>
 /// 五行阵环绕特效
 /// </summary>
 public void PlayCopyTargetEffect()
 {
     if (m_trans_copyTargetEffectRoot != null)
     {
         UIParticleWidget p = m_trans_copyTargetEffectRoot.GetComponent <UIParticleWidget>();
         if (p == null)
         {
             p       = m_trans_copyTargetEffectRoot.gameObject.AddComponent <UIParticleWidget>();
             p.depth = 20;
         }
         if (p != null)
         {
             p.SetDimensions(260, 225);
             p.ReleaseParticle();
             p.AddRoundParticle();
         }
     }
 }
Exemple #23
0
    void ShowEffect(uint effectID)
    {
        Transform bg = transform.Find("Up/RedEnvelopeScrollView/gridRoot");

        if (bg != null)
        {
            UIParticleWidget p = bg.GetComponent <UIParticleWidget>();
            if (p == null)
            {
                p       = bg.gameObject.AddComponent <UIParticleWidget>();
                p.depth = 100;
            }
            if (p != null)
            {
                p.ReleaseParticle();
                p.AddParticle(effectID);
            }
        }
    }
Exemple #24
0
    /// <summary>
    /// 星星特效
    /// </summary>
    /// <param name="num"></param>
    /// <param name="pos"></param>
    void PlayStarEffect(Vector3 pos)
    {
        m_sprite_star.gameObject.SetActive(true);
        //特效
        UIParticleWidget wight = m_sprite_star.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m_sprite_star.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (wight != null)
        {
            wight.ReleaseParticle();
            starEffectPos = pos;
            wight.AddParticle(50007, StarEffectCallBack);
        }
    }
 public void RefreshSigne()
 {
     if (m_goSelect != null)
     {
         m_goSelect.SetActive(true);
         UIParticleWidget p = m_goSelect.GetComponent <UIParticleWidget>();
         if (p == null)
         {
             p       = m_goSelect.gameObject.AddComponent <UIParticleWidget>();
             p.depth = 20;
         }
         if (p != null)
         {
             p.SetDimensions(150, 50);
             p.ReleaseParticle();
             p.AddRoundParticle();
         }
     }
 }
Exemple #26
0
    /// <summary>
    /// 释放特效
    /// </summary>
    void ReleaseEffect()
    {
        if (m_btn_StartFishingBtn != null)
        {
            UIParticleWidget p = m_btn_StartFishingBtn.GetComponent <UIParticleWidget>();
            if (p != null)
            {
                p.ReleaseParticle();
            }
        }

        if (m__icon != null)
        {
            UIParticleWidget p = m__icon.GetComponent <UIParticleWidget>();
            if (p != null)
            {
                p.ReleaseParticle();
            }
        }
    }
Exemple #27
0
    /// <summary>
    /// 寻路特效
    /// </summary>
    void PlayPathEffect()
    {
        m_trans_robotEffectRoot.gameObject.SetActive(false);
        m_trans_pathEffectRoot.gameObject.SetActive(true);
        m_label_tipsLabelRoot.gameObject.SetActive(false);
        //特效
        UIParticleWidget wight = m_trans_pathEffectRoot.GetComponent <UIParticleWidget>();

        if (null == wight)
        {
            wight       = m_trans_pathEffectRoot.gameObject.AddComponent <UIParticleWidget>();
            wight.depth = 100;
        }

        if (wight != null)
        {
            wight.ReleaseParticle();
            wight.AddParticle(50021);
        }
    }
Exemple #28
0
    void OnPlayBtnTeXiao(GameObject go, uint resourceID = 50009)
    {
        Transform root = go.transform.Find("Particle");

        if (root != null)
        {
            UIParticleWidget p = root.GetComponent <UIParticleWidget>();
            if (p == null)
            {
                p       = root.gameObject.AddComponent <UIParticleWidget>();
                p.depth = 100;
            }
            if (p != null)
            {
                p.SetDimensions(1, 1);
                p.ReleaseParticle();
                p.AddRoundParticle(resourceID);
            }
        }
    }
Exemple #29
0
 void PlayEffect(Transform trans, bool show)
 {
     if (trans != null)
     {
         UIParticleWidget p = trans.GetComponent <UIParticleWidget>();
         if (p == null)
         {
             p       = trans.gameObject.AddComponent <UIParticleWidget>();
             p.depth = 20;
         }
         if (p != null)
         {
             p.SetDimensions(1, 1);
             p.ReleaseParticle();
             if (show)
             {
                 p.AddParticle(50038);
             }
         }
     }
 }
Exemple #30
0
 void PlayEffect(bool show)
 {
     if (particle != null)
     {
         UIParticleWidget p = particle.GetComponent <UIParticleWidget>();
         if (p == null)
         {
             p       = particle.gameObject.AddComponent <UIParticleWidget>();
             p.depth = 20;
         }
         if (p != null)
         {
             p.SetDimensions(1, 1);
             p.ReleaseParticle();
             if (show)
             {
                 p.AddParticle(50036);
             }
         }
     }
 }