I’ve got a script that is not a component to anything, here is the code:
using UnityEngine;
using System.Collections;
public class PlayerCenter : MonoBehaviour {
public ParticleSystem particles;
public GameObject player;//these 2
void Start () {
particles.enableEmission = true;
}
public static void killPlayer(string reason){
GameObject.Destroy(player);
particles.transform.position = gameObject.transform.position;
particles.Play();
}
}
Apart from these errors :
[30116-screen+shot+2014-07-31+at+4.12.07+pm.png|30116]
I also want to find a way to attach my ‘player’ gameobject and ‘particles’ particle system to the script.
Here is how my project looks like:
[30117-screen+shot+2014-07-31+at+4.13.20+pm.png|30117]
Thanks in advance!