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.
 
 
 
 
 
 

30 lines
589 B

using UnityEngine;
using System.Collections;
namespace VFX_Explosion_Pack
{
public class AnimHelper : MonoBehaviour {
public ParticleSystem[] reseed_particles;
public float selfdestruct_in = 4; // SET THIS TO 0 TO NOT SELFDESTRUCT!.
void Awake () {
uint set_random_seed = (uint) Random.Range(0, 9999999999);
for(int i = 0; i < reseed_particles.Length; i++){
reseed_particles[i].randomSeed = set_random_seed;
reseed_particles[i].Play();
}
}
void Start (){
if ( selfdestruct_in != 0){
Destroy (gameObject, selfdestruct_in);
}
}
}
}