Пример #1
0
        public void Explode()
        {
            if (prefab != null)
            {
                GameObject           vp  = Instantiate(prefab, transform.position, transform.rotation);
                VoxelParticleExplode vpe = vp.GetComponent <VoxelParticleExplode>();
                if (vpe != null)
                {
                    vpe.Explode();
                }
            }

            Destroy(this.gameObject);
        }
Пример #2
0
        private void OnGUI()
        {
            if (voxParticle == null)
            {
                return;
            }

            if (GUILayout.Button("Reset"))
            {
                voxParticle.ResetParticles();
            }

            if (voxExplode)
            {
                if (GUILayout.Button("Explode"))
                {
                    voxExplode.Explode();
                }
            }
        }