void Start () { highlightRhinoSafebox = GameObject.Find ("highlightRhinoSafebox"); highlightRhinoSafebox02 = GameObject.Find ("highlightRhinoSafebox02"); highlightRhinoSafebox03 = GameObject.Find ("highlightRhinoSafebox03"); dummyCameraZoon01 = GameObject.Find ("dummyCameraZoon01"); dummyCameraZoon02 = GameObject.Find ("dummyCameraZoon02"); camera = GameObject.Find ("Main Camera"); //position on shelf dummyPos1 = GameObject.Find ("dummyPos1"); dummyPos2 = GameObject.Find ("dummyPos2"); dummyPos3 = GameObject.Find ("dummyPos3"); dummyPos4 = GameObject.Find ("dummyPos4"); rhinoDummy = GameObject.Find ("rhinoDummy"); highlightZebSafebox = GameObject.Find ("highlightZebSafebox"); highlightZebSafebox02 = GameObject.Find ("highlightZebSafebox02"); highlightZebSafebox03 = GameObject.Find ("highlightZebSafebox03"); if (PlayerPrefs.GetString("chaPos1") == "rhino") { transform.position = dummyPos1.transform.position; shelfPos = dummyPos1.transform.position; rhinoDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos2") == "rhino") { transform.position = dummyPos2.transform.position; shelfPos = dummyPos2.transform.position; rhinoDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos3") == "rhino") { transform.position = dummyPos3.transform.position; shelfPos = dummyPos3.transform.position; rhinoDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos4") == "rhino") { transform.position = dummyPos4.transform.position; shelfPos = dummyPos4.transform.position; rhinoDummy.transform.position = shelfPos; } else if (highlightZebSafebox) { Destroy(highlightZebSafebox); Destroy(highlightZebSafebox02); Destroy(highlightZebSafebox03); } timerObjectRhino = GameObject.Find ("timerObjectRhino"); timerRhino = GameObject.Find ("timerObjectRhino").GetComponent<timerRhino_Level_10>(); moneyTextSafebox = GameObject.Find ("moneyTextSafebox"); moneyTextSafebox02 = GameObject.Find ("moneyTextSafebox02"); moneyTextSafebox03 = GameObject.Find ("moneyTextSafebox03"); moneySafebox = GameObject.Find ("moneySafebox"); moneySafebox02 = GameObject.Find ("moneySafebox02"); moneySafebox03 = GameObject.Find ("moneySafebox03"); anim = this.GetComponent<Animator>(); }
void Start () { dummyCameraZoon01 = GameObject.Find ("dummyCameraZoon01"); dummyCameraZoon02 = GameObject.Find ("dummyCameraZoon02"); camera = GameObject.Find ("Main Camera"); AudioSource[] audios = GetComponents<AudioSource>(); drag = audios[0]; moneyDone = audios[1]; //position on shelf dummyPos1 = GameObject.Find ("dummyPos1"); dummyPos2 = GameObject.Find ("dummyPos2"); dummyPos3 = GameObject.Find ("dummyPos3"); dummyPos4 = GameObject.Find ("dummyPos4"); zebraDummy = GameObject.Find ("zebraDummy"); if (PlayerPrefs.GetString("chaPos1") == "zebra") { transform.position = dummyPos1.transform.position; shelfPos = dummyPos1.transform.position; zebraDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos2") == "zebra") { transform.position = dummyPos2.transform.position; shelfPos = dummyPos2.transform.position; zebraDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos3") == "zebra") { transform.position = dummyPos3.transform.position; shelfPos = dummyPos3.transform.position; zebraDummy.transform.position = shelfPos; } else if (PlayerPrefs.GetString("chaPos4") == "zebra") { transform.position = dummyPos4.transform.position; shelfPos = dummyPos4.transform.position; zebraDummy.transform.position = shelfPos; } dummyPosition = GameObject.Find ("dummyPos"+dummyPosNo); timerObjectZebra = GameObject.Find ("timerObjectZebra"); timerZebra = GameObject.Find ("timerObjectZebra").GetComponent<timerZebra_Level_10>(); monkey = GameObject.Find ("monkey"); timerMonkey = GameObject.Find ("timerObjectMonkey").GetComponent<timerMonkey_Level_10>(); rhino = GameObject.Find ("rhino"); timerRhino = GameObject.Find ("timerObjectRhino").GetComponent<timerRhino_Level_10>(); highlightMonMeercat01 = GameObject.Find ("highlightMonMeercat01"); highlightMonMeercat02 = GameObject.Find ("highlightMonMeercat02"); highlightMonMeercat03 = GameObject.Find ("highlightMonMeercat03"); highlightMonMeercat04 = GameObject.Find ("highlightMonMeercat04"); highlightMonMeercat05 = GameObject.Find ("highlightMonMeercat05"); highlightMonMeercat06 = GameObject.Find ("highlightMonMeercat06"); highlightMonRabbit01 = GameObject.Find ("highlightMonRabbit01"); highlightMonRabbit02 = GameObject.Find ("highlightMonRabbit02"); highlightMonRabbit03 = GameObject.Find ("highlightMonRabbit03"); highlightMonRabbit04 = GameObject.Find ("highlightMonRabbit04"); highlightMonRabbit05 = GameObject.Find ("highlightMonRabbit05"); highlightMonTeller01 = GameObject.Find ("highlightMonTeller01"); highlightMonTeller02 = GameObject.Find ("highlightMonTeller02"); highlightMonTeller03 = GameObject.Find ("highlightMonTeller03"); highlightMonTeller04 = GameObject.Find ("highlightMonTeller04"); highlightMonTeller05 = GameObject.Find ("highlightMonTeller05"); highlightMonTeller06 = GameObject.Find ("highlightMonTeller06"); highlightMonTeller07 = GameObject.Find ("highlightMonTeller07"); highlightMonTeller08 = GameObject.Find ("highlightMonTeller08"); highlightMonTeller09 = GameObject.Find ("highlightMonTeller09"); highlightMonTeller10 = GameObject.Find ("highlightMonTeller10"); highlightZebMeercat01 = GameObject.Find ("highlightZebMeercat01"); highlightZebMeercat02 = GameObject.Find ("highlightZebMeercat02"); highlightZebMeercat03 = GameObject.Find ("highlightZebMeercat03"); highlightZebMeercat04 = GameObject.Find ("highlightZebMeercat04"); highlightZebMeercat05 = GameObject.Find ("highlightZebMeercat05"); highlightZebMeercat06 = GameObject.Find ("highlightZebMeercat06"); highlightZebRabbit01 = GameObject.Find ("highlightZebRabbit01"); highlightZebRabbit02 = GameObject.Find ("highlightZebRabbit02"); highlightZebRabbit03 = GameObject.Find ("highlightZebRabbit03"); highlightZebRabbit04 = GameObject.Find ("highlightZebRabbit04"); highlightZebRabbit05 = GameObject.Find ("highlightZebRabbit05"); highlightZebTeller01 = GameObject.Find ("highlightZebTeller01"); highlightZebTeller02 = GameObject.Find ("highlightZebTeller02"); highlightZebTeller03 = GameObject.Find ("highlightZebTeller03"); highlightZebTeller04 = GameObject.Find ("highlightZebTeller04"); highlightZebTeller05 = GameObject.Find ("highlightZebTeller05"); highlightZebTeller06 = GameObject.Find ("highlightZebTeller06"); highlightZebTeller07 = GameObject.Find ("highlightZebTeller07"); highlightZebTeller08 = GameObject.Find ("highlightZebTeller08"); highlightZebTeller09 = GameObject.Find ("highlightZebTeller09"); highlightZebTeller10 = GameObject.Find ("highlightZebTeller10"); highlightZebSafebox = GameObject.Find ("highlightZebSafebox"); highlightZebSafebox02 = GameObject.Find ("highlightZebSafebox02"); highlightZebSafebox03 = GameObject.Find ("highlightZebSafebox03"); moneyTeller01 = GameObject.Find ("moneyTeller01"); moneyTeller02 = GameObject.Find ("moneyTeller02"); moneyTeller03 = GameObject.Find ("moneyTeller03"); moneyTeller04 = GameObject.Find ("moneyTeller04"); moneyTeller05 = GameObject.Find ("moneyTeller05"); moneyTeller06 = GameObject.Find ("moneyTeller06"); moneyTeller07 = GameObject.Find ("moneyTeller07"); moneyTeller08 = GameObject.Find ("moneyTeller08"); moneyTeller09 = GameObject.Find ("moneyTeller09"); moneyTeller10 = GameObject.Find ("moneyTeller10"); moneySafebox = GameObject.Find ("moneySafebox"); moneySafebox02 = GameObject.Find ("moneySafebox02"); moneySafebox03 = GameObject.Find ("moneySafebox03"); anim = this.GetComponent<Animator>(); }