Exemplo n.º 1
0
 void StopModlues(GameObject ModluesObj, EffectModules moudles)
 {
     if (ModluesObj)
     {
         if (null != moudles)
         {
             moudles.Stop();
         }
     }
 }
Exemplo n.º 2
0
 private void RestModluesScale(GameObject modluesObj, EffectModules moudlues)
 {
     if (modluesObj)
     {
         if (!modluesObj.activeSelf)
         {
             Debug.LogWarning("物体没有激活,:" + gameObject.name);
             return;
         }
         if (null != moudlues && moudlues.isBaked)
         {
             moudlues.ResetScale();
         }
         else
         {
             Debug.LogWarning(name + "没有bake,请重新点击bake");
             return;
         }
     }
 }
Exemplo n.º 3
0
 private void SetParticleModluesSpeed(GameObject modluesObj, EffectModules moudlues, float Speed)
 {
     if (modluesObj)
     {
         if (!modluesObj.activeSelf)
         {
             Debug.LogWarning("物体没有激活,失败:" + gameObject.name);
             return;
         }
         if (null != moudlues && moudlues.isBaked)
         {
             moudlues.SetParticleSpeed(Speed);
         }
         else
         {
             Debug.LogWarning(name + "没有bake,请重新点击bake");
             return;
         }
     }
 }
Exemplo n.º 4
0
        void PlayModlues(GameObject ModluesObj, EffectModules moudles, bool bEnemy, int mask)
        {
            if (ModluesObj)
            {
                if (!ModluesObj.activeSelf)
                {
                    Debug.LogWarning("物体没有激活:" + ModluesObj.name);
                    return;
                }

                if (null != moudles && moudles.isBaked)
                {
                    DispatchRender(moudles);
                    moudles.Play(bEnemy, mask);
                }
                else
                {
                    Debug.LogWarning(name + "没有bake,请重新点击bake");
                    return;
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 分发渲染器,分发到对应的glow、DissloveGlow、GlowOutLine中
        /// </summary>
        void DispatchRender(EffectModules modules)
        {
            foreach (Renderer r in modules.m_Normal_Renders)
            {
                if (!r)
                {
                    Debug.LogWarning(name + ",bake信息已经改变,请美术重新bake!");
                    continue;
                }

                //层级不对,一边去
                if (r.gameObject.layer != LayerMask.NameToLayer(Config.LayerLightingEffectOnly))
                {
                    continue;
                }

                Material mat = r.sharedMaterial;
                if (!EffectUtily.DispatchRenderToGlow(r, mat, 0))
                {
                    if (!EffectUtily.DispatchRenderToDissolveGlow(r, mat, 0))
                    {
                        if (EffectUtily.DispatchRenderToGlowOutLine(r, mat, 0))
                        {
                            m_DispatchedRender.Add(r, mat);
                        }
                    }
                    else
                    {
                        m_DispatchedRender.Add(r, mat);
                    }
                }
                else
                {
                    m_DispatchedRender.Add(r, mat);
                }
            }
        }