// Use this for initialization void OnLevelWasLoaded() { transitionprogress = audio.timeSamples; currenttracklength = audio.clip.length; liscript = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); if (liscript.levelmusic != null) { if (liscript.levelmusic != audio.clip) //switch tracks { audio.Stop(); difference = liscript.levelmusic.length / currenttracklength * transitionprogress; changeto = (int)difference; audio.clip = liscript.levelmusic; audio.timeSamples = changeto; audio.Play(); //Debug.Log (audio.clip.length); } } else if (audio.clip != defaultclip) //Switch to Polka Waltz { audio.Stop(); difference = defaultclip.length / currenttracklength * transitionprogress; changeto = (int)difference; audio.clip = defaultclip; audio.timeSamples = changeto; audio.Play(); //Debug.Log (audio.clip.length); } }
void Awake() { theball = GameObject.Find("Plastic Ball"); thegerbil = GameObject.Find("Gerbil"); ballscript = theball.GetComponent <PlayerForce> (); liscript = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); gerbilcenter = new Vector3(-0.27f, 0f, 3f); }
// Use this for initialization void Awake() { base.Awake(); camobj = GameObject.FindGameObjectWithTag("MainCamera"); camcam = camobj.GetComponent <Camera> (); script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); //zoomto = script.fullzoom; zoomlocation = camobj.transform.position; startpanel = GameObject.Find("Scene Start Panel"); }
void Awake() { source = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); title.GetComponent <Text>().text = source.title; instruction.GetComponent <Text>().text = source.instructions; if (source.scoreistimed == false) { highscore.GetComponent <Text> ().text = "High Score\n" + PlayerPrefs.GetFloat("highscore" + Application.loadedLevelName); } else { highscore.GetComponent <Text> ().text = "Best Time\n" + PlayerPrefs.GetFloat("highscore" + Application.loadedLevelName); } }
// Use this for initialization public override void Awake() { base.Awake(); script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); }
// Use this for initialization void Start() { destination = point1; script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); }
void Awake() { script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); pfscript = GameObject.Find("Plastic Ball").GetComponent <PlayerForce> (); dtext = GameObject.Find("DeathText"); }
// Use this for initialization void Start() { gcscript = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); }
void Awake() { script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); }
void Awake() { rainbow = targetobj.GetComponent <TrailRenderer> (); script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); }
// Use this for initialization void Awake() { infoscript = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); leftscript = leftpit.GetComponent <ItemDetectScript> (); rightscript = rightpit.GetComponent <ItemDetectScript> (); }
// Use this for initialization void Awake() { camobj = GameObject.FindGameObjectWithTag("MainCamera"); camcam = camobj.GetComponent <CamControl> (); script = GameObject.Find("EventSystem").GetComponent <LevelInformationScript> (); }