void Start() { 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"); dummyHighlightZebMeercat01 = GameObject.Find("dummyHighlightZebMeercat01"); dummyHighlightZebMeercat02 = GameObject.Find("dummyHighlightZebMeercat02"); dummyHighlightZebMeercat03 = GameObject.Find("dummyHighlightZebMeercat03"); dummyHighlightZebMeercat04 = GameObject.Find("dummyHighlightZebMeercat04"); dummyHighlightZebMeercat05 = GameObject.Find("dummyHighlightZebMeercat05"); dummyHighlightZebMeercat06 = GameObject.Find("dummyHighlightZebMeercat06"); dummyHighlightZebRabbit01 = GameObject.Find("dummyHighlightZebRabbit01"); dummyHighlightZebRabbit02 = GameObject.Find("dummyHighlightZebRabbit02"); dummyHighlightZebRabbit03 = GameObject.Find("dummyHighlightZebRabbit03"); dummyHighlightZebRabbit04 = GameObject.Find("dummyHighlightZebRabbit04"); dummyHighlightZebRabbit05 = GameObject.Find("dummyHighlightZebRabbit05"); dummyHighlightZebTeller01 = GameObject.Find("dummyHighlightZebTeller01"); dummyHighlightZebTeller02 = GameObject.Find("dummyHighlightZebTeller02"); dummyHighlightZebTeller03 = GameObject.Find("dummyHighlightZebTeller03"); dummyHighlightZebTeller04 = GameObject.Find("dummyHighlightZebTeller04"); dummyHighlightZebTeller05 = GameObject.Find("dummyHighlightZebTeller05"); dummyHighlightZebTeller06 = GameObject.Find("dummyHighlightZebTeller06"); dummyHighlightZebTeller07 = GameObject.Find("dummyHighlightZebTeller07"); dummyHighlightZebTeller08 = GameObject.Find("dummyHighlightZebTeller08"); dummyHighlightZebTeller09 = GameObject.Find("dummyHighlightZebTeller09"); dummyHighlightZebTeller10 = GameObject.Find("dummyHighlightZebTeller10"); dummyHighlightZebSafebox = GameObject.Find("dummyHighlightZebSafebox"); dummyHighlightZebSafebox02 = GameObject.Find("dummyHighlightZebSafebox02"); dummyHighlightZebSafebox03 = GameObject.Find("dummyHighlightZebSafebox03"); moneyTextMeercat01 = GameObject.Find("moneyTextMeercat01"); moneyTextMeercat02 = GameObject.Find("moneyTextMeercat02"); moneyTextMeercat03 = GameObject.Find("moneyTextMeercat03"); moneyTextMeercat04 = GameObject.Find("moneyTextMeercat04"); moneyTextMeercat05 = GameObject.Find("moneyTextMeercat05"); moneyTextMeercat06 = GameObject.Find("moneyTextMeercat06"); moneyTextRabbit01 = GameObject.Find("moneyTextRabbit01"); moneyTextRabbit02 = GameObject.Find("moneyTextRabbit02"); moneyTextRabbit03 = GameObject.Find("moneyTextRabbit03"); moneyTextRabbit04 = GameObject.Find("moneyTextRabbit04"); moneyTextRabbit05 = GameObject.Find("moneyTextRabbit05"); moneyTextTeller01 = GameObject.Find("moneyTextTeller01"); moneyTextTeller02 = GameObject.Find("moneyTextTeller02"); moneyTextTeller03 = GameObject.Find("moneyTextTeller03"); moneyTextTeller04 = GameObject.Find("moneyTextTeller04"); moneyTextTeller05 = GameObject.Find("moneyTextTeller05"); moneyTextTeller06 = GameObject.Find("moneyTextTeller06"); moneyTextTeller07 = GameObject.Find("moneyTextTeller07"); moneyTextTeller08 = GameObject.Find("moneyTextTeller08"); moneyTextTeller09 = GameObject.Find("moneyTextTeller09"); moneyTextTeller10 = GameObject.Find("moneyTextTeller10"); moneyTextSafebox = GameObject.Find("moneyTextSafebox"); moneyTextSafebox02 = GameObject.Find("moneyTextSafebox02"); moneyTextSafebox03 = GameObject.Find("moneyTextSafebox03"); 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"); zebra = GameObject.Find("zebra"); zebraScript = GameObject.Find("zebra").GetComponent <zebra_Level_10>(); scoreMoney = GameObject.Find("scoreGUItext").GetComponent <gameScore_Level_10>(); timerM1_10secondsObject = GameObject.Find("timerM1_10seconds"); timerM2_10secondsObject = GameObject.Find("timerM2_10seconds"); timerM3_10secondsObject = GameObject.Find("timerM3_10seconds"); timerM4_10secondsObject = GameObject.Find("timerM4_10seconds"); timerM5_10secondsObject = GameObject.Find("timerM5_10seconds"); timerM6_10secondsObject = GameObject.Find("timerM6_10seconds"); timerR1_10secondsObject = GameObject.Find("timerR1_10seconds"); timerR2_10secondsObject = GameObject.Find("timerR2_10seconds"); timerR3_10secondsObject = GameObject.Find("timerR3_10seconds"); timerR4_10secondsObject = GameObject.Find("timerR4_10seconds"); timerR5_10secondsObject = GameObject.Find("timerR5_10seconds"); timerT1_10secondsObject = GameObject.Find("timerT1_10seconds"); timerT2_10secondsObject = GameObject.Find("timerT2_10seconds"); timerT3_10secondsObject = GameObject.Find("timerT3_10seconds"); timerT4_10secondsObject = GameObject.Find("timerT4_10seconds"); timerT5_10secondsObject = GameObject.Find("timerT5_10seconds"); timerT6_10secondsObject = GameObject.Find("timerT6_10seconds"); timerT7_10secondsObject = GameObject.Find("timerT7_10seconds"); timerT8_10secondsObject = GameObject.Find("timerT8_10seconds"); timerT9_10secondsObject = GameObject.Find("timerT9_10seconds"); timerT10_10secondsObject = GameObject.Find("timerT10_10seconds"); timerSB_10secondsObject = GameObject.Find("timerSB_10seconds"); timerSB02_10secondsObject = GameObject.Find("timerSB02_10seconds"); timerSB03_10secondsObject = GameObject.Find("timerSB03_10seconds"); anim = this.GetComponent <Animator>(); }
void Start() { monkey = GameObject.Find("monkey"); rhino = GameObject.Find("rhino"); dog = GameObject.Find("dog"); pigEvilScript = GameObject.Find("pigEvil").GetComponent <pigEvil_level_10>(); zebraSafeBoxCheck = GameObject.Find("timerObjectZebra").GetComponent <timerZebra_Level_10>(); currentLevelName = Application.loadedLevelName; guiText.text = ("Time left: " + levelTimer.ToString("f0")); 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"); scoreGUItext = GameObject.Find("scoreGUItext"); timerGUIText = GameObject.Find("timerGUIText"); score = GameObject.Find("scoreGUItext").GetComponent <gameScore_Level_10>(); timerBGObject = GameObject.Find("timerBG"); timerObjectZebra = GameObject.Find("timerObjectZebra"); int screenWidthX = Screen.width; int screenHeightY = Screen.height; Vector3 timerBGPos = Camera.main.WorldToScreenPoint(timerBGObject.transform.position); float timerPos_x = (timerBGPos.x / screenWidthX); float timerPos_y = (timerBGPos.y / screenHeightY); this.transform.position = new Vector3(timerPos_x, timerPos_y - 0.01f, 0); zebra = GameObject.Find("zebra"); zebraDummy = GameObject.Find("zebraDummy"); endResultScript = GameObject.Find("endResult").GetComponent <endResult>(); guiText.fontSize = (int)(Screen.width * 0.05f); }