private void CreateNoiseVolume() { if (PyroTechnixExplosion.NoiseVolume == null) { PyroTechnixExplosion.GenerateNoiseTexture(); } }
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); } }