コード例 #1
0
        //-------------------------------------------------------------------------
        public void init()
        {
            mTransform      = transform;
            mParticleSystem = GetComponent <ParticleSystem>();
            mBaseParticle   = gameObject.GetComponent <BaseParticle>();

            if (mBaseParticle == null)
            {
                mBaseParticle = gameObject.AddComponent <NullParticle>();
            }
        }
コード例 #2
0
        //-------------------------------------------------------------------------
        public void destroy()
        {
            if (mBaseParticle != null)
            {
                mBaseParticle.destroy();
                mBaseParticle = null;
            }

            if (gameObject != null)
            {
                Destroy(gameObject);
            }
        }