You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
527 B

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