예제 #1
0
        void Awake()
        {
            if (hasNestedEffect)
            {
                particleSys.AddRange(GetComponentsInChildren <ParticleSystem>());
                nestedEffects.AddRange(GetComponentsInChildren <NoteEffect>());

                //remove self
                nestedEffects.Remove(this);
            }
            else
            {
                particleSys.Add(GetComponent <ParticleSystem>());
            }

            if (transform.parent)
            {
                effectParent = transform.parent.GetComponent <NoteEffect>();
            }
        }