// Use this for initialization
 void Start()
 {
     m_rbodies = GetComponentsInChildren<Rigidbody>();
     m_colliders = GetComponentsInChildren<Collider>();
     m_renderers = GetComponentsInChildren<Renderer>();
     if (m_popEffect)
     {
         if (m_particleEffect == null)
         {
             m_particleEffect = GameObject.Find(m_popEffectName).transform;
         }
         Transform particleeffect = Instantiate(m_particleEffect, transform.position, transform.rotation) as Transform;
         m_timelineEffect = particleeffect.gameObject.AddComponent<PopInTimelineEffect>();
         particleeffect.name = "popeffect-" + gameObject.name;
         //particleeffect.parent = transform;
     }
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     if (m_explodeEffect == null)
     {
         m_explodeEffect = GameObject.Find("LaserPof").transform;
     }
     Transform particleeffect = Instantiate(m_explodeEffect, transform.position, transform.rotation) as Transform;
     m_laserExplode = particleeffect.gameObject.AddComponent<PopInTimelineEffect>();
     particleeffect.name = "laserpof-" + gameObject.name;
 }