1 using System;
2 using
UnityEngine;
3
4
5 namespace
UnityStandardAssets.Effects
6 {
7     
public class ExtinguishableParticleSystem : MonoBehaviour
8     {
9         
public float multiplier = 1;
10
11         
private ParticleSystem[] m_Systems;
12
13
14         
private void Start()
15         {
16             m_Systems = GetComponentsInChildren<ParticleSystem>();
17         }
18
19
20         
public void Extinguish()
21         {
22             
foreach (var system in m_Systems)
23             {
24                 
var emission = system.emission;
25                 emission.enabled =
false;
26             }
27         }
28     }
29 }