1 using System;
2 using
UnityEngine;
3
4 namespace
UnityStandardAssets.Effects
5 {
6     
public class ParticleSystemMultiplier : MonoBehaviour
7     {
8         
// a simple script to scale the size, speed and lifetime of a particle system
9
10         
public float multiplier = 1;
11
12
13         
private void Start()
14         {
15             
var systems = GetComponentsInChildren<ParticleSystem>();
16             
foreach (ParticleSystem system in systems)
17             {
18                 system.startSize *= multiplier;
19                 system.startSpeed *= multiplier;
20                 system.startLifetime *= Mathf.Lerp(multiplier,
1, 0.5f);
21                 system.Clear();
22                 system.Play();
23             }
24         }
25     }
26 }