void Start() { dog = GameObject.Find("dog").GetComponent <dog_Level_09>(); camera = GameObject.Find("Main Camera").GetComponent <Camera>(); currentLevelName = Application.loadedLevelName; AudioSource[] audios = GetComponents <AudioSource>(); laughing = audios[0]; moneyback = audios[1]; }
void Start() { dummyCameraZoon01 = GameObject.Find("dummyCameraZoon01"); dummyCameraZoon02 = GameObject.Find("dummyCameraZoon02"); camera = GameObject.Find("Main Camera"); //gorilla position on shelf dummyPos1 = GameObject.Find("dummyPos1"); dummyPos2 = GameObject.Find("dummyPos2"); dummyPos3 = GameObject.Find("dummyPos3"); dummyPos4 = GameObject.Find("dummyPos4"); gorillaDummy = GameObject.Find("gorillaDummy"); if (PlayerPrefs.GetString("chaPos1") == "gorilla") { transform.position = dummyPos1.transform.position; shelfPos = dummyPos1.transform.position; gorillaDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos2") == "gorilla") { transform.position = dummyPos2.transform.position; shelfPos = dummyPos2.transform.position; gorillaDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos3") == "gorilla") { transform.position = dummyPos3.transform.position; shelfPos = dummyPos3.transform.position; gorillaDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos4") == "gorilla") { transform.position = dummyPos4.transform.position; shelfPos = dummyPos4.transform.position; gorillaDummy.transform.position = shelfPos; } highlightDog = GameObject.Find("highlightDog"); dog = GameObject.Find("dog"); dogScript = GameObject.Find("dog").GetComponent <dog_Level_09>(); anim = this.GetComponent <Animator>(); }