// Use this for initialization void Start() { //get the crazy tree renderer and store it in an array crazyTrees = this.gameObject.GetComponentsInChildren <Renderer>(); //call the set on function setOn(); //get the sanity meter from the sanity handler sanity = GameObject.FindWithTag("SanityHandler").GetComponent <SanityMeter>(); }
// Use this for initialization void Start() { //get all the haulcinating roads renderers hollowRoad = this.gameObject.GetComponentsInChildren <Renderer>(); //turn off at start setOff(); //get the sanitymeter from sanity handler sanity = GameObject.FindWithTag("SanityHandler").GetComponent <SanityMeter>(); }
void Awake() { //do the same things as in Start() to apply it when the objects get activated sm = GameObject.FindWithTag("SanityHandler").GetComponent <SanityMeter>(); coroutine_running = false; textClip = GetComponent <RandomAudioClip>().getRandomClip(GetComponent <RandomAudioClip>().soundClips); radio = GameObject.FindGameObjectWithTag("Radio").GetComponent <Radio>(); pose2 = GameObject.Find("PublicObjects").GetComponent <PublicObjects>().musicianPose2; carPosition = GameObject.Find("PublicObjects").GetComponent <PublicObjects>().carPosition2; }
public Radio radio; //to access the radio // Use this for initialization void Start() { //the coroutine is not currently running coroutine_running = false; //find the game objects needed in the scene and the PublicObjects script sm = GameObject.FindWithTag("SanityHandler").GetComponent <SanityMeter>(); textClip = GetComponent <RandomAudioClip>().getRandomClip(GetComponent <RandomAudioClip>().soundClips); pose2 = GameObject.Find("PublicObjects").GetComponent <PublicObjects>().musicianPose2; carPosition = GameObject.Find("PublicObjects").GetComponent <PublicObjects>().carPosition2; radio = GameObject.Find("PublicObjects").GetComponent <PublicObjects>().radio.GetComponent <Radio>(); }