private Clicker touched = new Clicker(); //if touched, stop. void Start() { head = Camera.main.transform; body1 = transform.Find("wheelchair_2"); //Scene1 Stopimg2.GetComponent <RawImage> ().color = nocolor; Goimg2.GetComponent <RawImage>().color = gocolor; Stopimg.GetComponent <RawImage> ().color = nocolor; Goimg.GetComponent <RawImage>().color = gocolor; lightTime.text = "0"; lightTime2.text = "0"; Watch.text = "Time" + "\n" + "12:59:" + "0"; starttime = Time.time; afterfailtime = 10.0f; afterfailtime2 = 10.0f; scene2timereset = 0; scene1_info.SetActive(false); afterfail_info.SetActive(false); s2_info.SetActive(false); afterfail_info_s2.SetActive(false); able_slope.SetActive(false); restart_info.SetActive(false); restart_info_s2.SetActive(false); starttouch = 0; // start to touch //this is for sound carhorn = GameObject.Find("jeep").GetComponent <AudioSource>(); // find audio sources scene1snd = scene1_info.GetComponent <AudioSource>(); scene2snd = s2_info.GetComponent <AudioSource> (); finalsnd = GameObject.Find("final_msg").GetComponent <AudioSource> (); // lookWalk = GetComponent <HeadLook> (); }
protected override void Awake() { base.Awake(); movement = GetComponent <PlayerMovement>(); head = GetComponentInChildren <HeadLook>(); source = GetComponent <AudioSource>(); }
// Use this for initialization void Start() { lookWalk = GetComponent <HeadLook> (); head = Camera.main.transform; wheelchair = transform.Find("wheelchair_2"); }