Esempio n. 1
0
        public void BuildParticles()
        {
            ParticleSystem[]    ps = (ParticleSystem[])FindObjectsOfType(typeof(ParticleSystem));
            XOCp_ResourceHolder xr = XOCp_ResourceHolder.inst.GetComponent <XOCp_ResourceHolder>();

            if (xr != null)
            {
                if (ps.Length > 0)
                {
                    List <UnityEngine.GameObject> tmplst = new List <UnityEngine.GameObject>();
                    if (tmplst != null)
                    {
                        for (int i = 0; i < ps.Length; i++)
                        {
                            ParticleSystem p = ps[i];
                            if (p != null && p.gameObject != null && XOCp_ResourceHolder.IsParticleDetailed(p.gameObject))
                            {
                                tmplst.Add(p.gameObject);
                            }
                        }

                        if (tmplst.Count > 0)
                        {
                            xr.m_ParticleArray = tmplst.ToArray();
                        }
                        else
                        {
                            xr.m_ParticleArray = null;
                        }
                    }
                    else
                    {
                        xr.m_ParticleArray = null;
                    }
                }
                else
                {
                    xr.m_ParticleArray = null;
                }
            }
        }
Esempio n. 2
0
 public static void SceneParticleMark()
 {
     XOCp_ResourceHolder.SceneParticleMark();
 }
Esempio n. 3
0
 public static void SceneParticleMark()
 {
     XOCp_ResourceHolder.CreateRoot();
     XOCp_ResourceHolder.inst.GetComponent <XOCp_ResourceHolder>().BuildParticles();
 }