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(); } } }
/// <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); } }
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; } } } }
public void AddEffectInSkillPanel() { if (particle != null) { if (particle != null) { particle.SetDimensions(1, 1); particle.ReleaseParticle(); particle.AddParticle(50023); } } }
/// <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); } }