Ejemplo n.º 1
0
    public void StopStaticEffect(E_PARTICLE_STATIC_EFFECT eId, int nIndex)
    {
        EffectSet             cRes = m_dicStaticEffect[eId];
        List <ParticleSystem> listParticleSystem = cRes.m_listParticleSystem;

        listParticleSystem[nIndex].Stop();
    }
Ejemplo n.º 2
0
    public void SetStaticEffectPosition(E_PARTICLE_STATIC_EFFECT eId, int nIndex, Vector3 vWorldPos)
    {
        if (m_dicStaticEffect.ContainsKey(eId) == false)
        {
            return;
        }

        EffectSet             cRes = m_dicStaticEffect[eId];
        List <ParticleSystem> listParticleSystem = cRes.m_listParticleSystem;

        listParticleSystem[nIndex].transform.position = vWorldPos;
    }
Ejemplo n.º 3
0
 public void AddStaticEffect(E_PARTICLE_STATIC_EFFECT eId, string sResourceName, int nCount)
 {
     if (m_dicStaticEffect.ContainsKey(eId) == false)
     {
         m_dicStaticEffect.Add(eId, new EffectSet());
         for (int i = 0; i < nCount; i++)
         {
             GameObject obj = GameObject.Instantiate(Resources.Load(sResourceName), new Vector3(0.0f, -1000.0f, 0.0f), Quaternion.identity) as GameObject;
             obj.isStatic         = true;
             obj.transform.parent = m_objParticleEffectGroup.transform;
             m_dicStaticEffect[eId].m_listParticleSystem.Add(obj.GetComponent <ParticleSystem>());
         }
     }
 }