Пример #1
0
 private void CreateDustCloud(Vector2 point)
 {
     if (this.DustEmitter != null)
     {
         // Create a cloud of dust that will die after a while
         ParticleSystem dust = GameObject.Instantiate <ParticleSystem>(this.DustEmitter);
         TemporaryFX    temp = dust.gameObject.AddComponent <TemporaryFX>();
         temp.LifeTime           = dust.main.duration;
         dust.transform.position = point;
         dust.Play();
     }
 }
Пример #2
0
 private void CreateSplash(Vector2 point)
 {
     if (this.SplashEmitter != null)
     {
         // Create a water effect that will die after a while
         ParticleSystem splash = GameObject.Instantiate <ParticleSystem>(this.SplashEmitter);
         TemporaryFX    temp   = splash.gameObject.AddComponent <TemporaryFX>();
         temp.LifeTime             = splash.main.duration;
         splash.transform.position = point;
         splash.Play();
     }
 }