using UnityEngine;
using System.Collections;
public class firebreathing : MonoBehaviour {
public ParticleSystem firebreath;
public GameObject pointlight;
public BoxCollider fire;
public AudioClip sizzle;
void Start(){
firebreath.GetComponent<ParticleSystem> ().enableEmission = false;
pointlight.active = false;
fire.enabled = false;
}
void Update () {
if(Input.GetKey(KeyCode.Mouse0)){
firebreath.GetComponent<ParticleSystem>().enableEmission = true;
pointlight.active = true;
fire.enabled = true;
GetComponent<AudioSource>().clip = sizzle;
GetComponent<AudioSource>().Play();
}
else if(Input.GetKeyUp(KeyCode.Mouse0)){
firebreath.GetComponent<ParticleSystem>().enableEmission = false;
pointlight.active = false;
fire.enabled = false;
GetComponent<AudioSource>().Stop();
}
}
}
You forgot to write down what you want, and your problem