IEnumerator waitOnPlay() { yield return(new WaitForSeconds(2.0f)); if (monkeyScript.monkeyIsInside == true && highlightZebMeercat01 == true && monkey.transform.position == highlightZebMeercat01.transform.position) { monkeyFinishedMeercat01 = true; timerM1_10secondsScript.timerUnhide(); monkeyScript.monkeyDone.Play(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat02 == true && monkey.transform.position == highlightZebMeercat02.transform.position) { monkeyFinishedMeercat02 = true; timerM2_10secondsScript.timerUnhide(); monkeyScript.monkeyDone.Play(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat03 == true && monkey.transform.position == highlightZebMeercat03.transform.position) { monkeyFinishedMeercat03 = true; timerM3_10secondsScript.timerUnhide(); monkeyScript.monkeyDone.Play(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller01 == true && monkey.transform.position == highlightZebTeller01.transform.position) { monkeyFinishedTeller01 = true; moneyTeller01.renderer.enabled = true; timerT1_10secondsScript.timerUnhide(); monkeyScript.monkeyDone.Play(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller03 == true && monkey.transform.position == highlightZebTeller03.transform.position) { monkeyFinishedTeller03 = true; moneyTeller03.renderer.enabled = true; timerT3_10secondsScript.timerUnhide(); monkeyScript.monkeyDone.Play(); timeroff(); } else { timeroff(); } }
IEnumerator waitOnPlay() { yield return(new WaitForSeconds(2.0f)); if (monkeyScript.monkeyIsInside == true && highlightZebMeercat01 == true && monkey.transform.position == highlightZebMeercat01.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedMeercat01 = true; timerM1_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat02 == true && monkey.transform.position == highlightZebMeercat02.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedMeercat02 = true; timerM2_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat03 == true && monkey.transform.position == highlightZebMeercat03.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedMeercat03 = true; timerM3_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat04 == true && monkey.transform.position == highlightZebMeercat04.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedMeercat04 = true; timerM4_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat05 == true && monkey.transform.position == highlightZebMeercat05.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedMeercat05 = true; timerM5_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebMeercat06 == true && monkey.transform.position == highlightZebMeercat06.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedMeercat06 = true; timerM6_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebRabbit01 == true && monkey.transform.position == highlightZebRabbit01.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedRabbit01 = true; timerR1_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebRabbit02 == true && monkey.transform.position == highlightZebRabbit02.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedRabbit02 = true; timerR2_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebRabbit03 == true && monkey.transform.position == highlightZebRabbit03.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedRabbit03 = true; timerR3_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebRabbit04 == true && monkey.transform.position == highlightZebRabbit04.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedRabbit04 = true; timerR4_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebRabbit05 == true && monkey.transform.position == highlightZebRabbit05.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedRabbit05 = true; timerR5_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller01 == true && monkey.transform.position == highlightZebTeller01.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller01 = true; moneyTeller01.renderer.enabled = true; timerT1_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller02 == true && monkey.transform.position == highlightZebTeller02.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller02 = true; moneyTeller02.renderer.enabled = true; timerT2_10secondsScript.timerUnhide(); timeroff(); } //else if (monkeyScript.monkeyIsInside == true && highlightZebTeller03 == true && monkey.transform.position == highlightZebTeller03.transform.position) else if (monkeyScript.monkeyIsInside == true && highlightZebTeller03 == true && monkey.transform.position == highlightZebTeller03.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller03 = true; moneyTeller03.renderer.enabled = true; timerT3_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller04 == true && monkey.transform.position == highlightZebTeller04.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller04 = true; moneyTeller04.renderer.enabled = true; timerT4_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller05 == true && monkey.transform.position == highlightZebTeller05.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller05 = true; moneyTeller05.renderer.enabled = true; timerT5_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller06 == true && monkey.transform.position == highlightZebTeller06.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller06 = true; moneyTeller06.renderer.enabled = true; timerT6_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller07 == true && monkey.transform.position == highlightZebTeller07.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller07 = true; moneyTeller07.renderer.enabled = true; timerT7_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller08 == true && monkey.transform.position == highlightZebTeller08.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller08 = true; moneyTeller08.renderer.enabled = true; timerT8_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller09 == true && monkey.transform.position == highlightZebTeller09.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller09 = true; moneyTeller09.renderer.enabled = true; timerT9_10secondsScript.timerUnhide(); timeroff(); } else if (monkeyScript.monkeyIsInside == true && highlightZebTeller10 == true && monkey.transform.position == highlightZebTeller10.transform.position) { monkeyScript.moneyDone.Play(); monkeyFinishedTeller10 = true; moneyTeller10.renderer.enabled = true; timerT10_10secondsScript.timerUnhide(); timeroff(); } else { timeroff(); } }