예제 #1
0
 private void CreateNoiseVolume()
 {
     if (PyroTechnixExplosion.NoiseVolume == null)
     {
         PyroTechnixExplosion.GenerateNoiseTexture();
     }
 }
예제 #2
0
        public void OnExplode(ExplosionSystem me)
        {
            lifeExpectancy = Random.Range(minLife, maxLife);

            if (explosionPrefab != null)
            {
                explosionInstance = Instantiate(explosionPrefab, transform.position, transform.rotation) as PyroTechnixExplosion;
                explosionInstance.transform.parent = transform;
            }

            Destroy(gameObject, lifeExpectancy);

            foreach (IExplosionModule module in gameObject.GetInterfaces <IExplosionModule>())
            {
                if (module == this)
                {
                    continue;
                }

                module.OnExplode(this);
            }
        }