Hi, i have a problem with a simple blood partcle system. I want to play the bool particles before the player death. To make this i have done this script:
using UnityEngine;
using System.Collections;
public class collisione : MonoBehaviour {
public ParticleSystem blood;
void OnCollisionEnter2D (Collision2D coll)
{if (coll.gameObject.tag == "triangolo") {
blood.Emit(100); //emit 100 blod particles
GameObject.Find ("Main Camera").GetComponent<lives>().morte(); //decrease the player lifes
Destroy (this.gameObject); //destroy the player gameobject
}
}
}
This script work but it plays the particles after the player respawn. I want to see the particles on the player collison with triangle tagged objects