//each target has this script that will collect damage and report status, as well as change sprite to dead sprite. //turret action can access this script by finding it, it will call the on hit function and kill functions // Use this for initialization void Start() { //get the script on the turret so we can do what we want with it taScript = TurretObject.GetComponent <BNG_TurretAction>(); particles = new ParticleSystem(); sr = GetComponent <SpriteRenderer>(); }
//each target has this script that will collect damage and report status, as well as change sprite to dead sprite. //turret action can access this script by finding it, it will call the on hit function and kill functions // Use this for initialization void Start () { //get the script on the turret so we can do what we want with it taScript = TurretObject.GetComponent<BNG_TurretAction>(); particles = new ParticleSystem(); sr = GetComponent<SpriteRenderer>(); }