void CheckmonkeyBacktoPosition() { if (setPosButtonScript.chaPos1 == "monkey") { Debug.Log("setPosButtonScript.chaPos1 == monkey"); //pos1Check.pos1BoolChange(); pos1Check.pos1IsFree = true; this.audio.Play(); pauseBarScript.scaleNoCha(); pauseEndScript.scaleNoCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos1 = ""; checkLowerChaPos(); } else if (setPosButtonScript.chaPos2 == "monkey") { Debug.Log("setPosButtonScript.chaPos2 == monkey"); //pos2Check.pos2BoolChange(); pos2Check.pos2IsFree = true; this.audio.Play(); pauseBarScript.scaleOneCha(); pauseEndScript.scaleOneCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos2 = ""; checkLowerChaPos(); } else if (setPosButtonScript.chaPos3 == "monkey") { Debug.Log("setPosButtonScript.chaPos3 == monkey"); //pos3Check.pos3BoolChange(); pos3Check.pos3IsFree = true; this.audio.Play(); pauseBarScript.scaleTwoCha(); pauseEndScript.scaleTwoCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos3 = ""; checkLowerChaPos(); } else if (setPosButtonScript.chaPos4 == "monkey") { Debug.Log("setPosButtonScript.chaPos4 == monkey"); //pos4Check.pos4BoolChange(); pos4Check.pos4IsFree = true; this.audio.Play(); pauseBarScript.scaleThreeCha(); pauseEndScript.scaleThreeCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos4 = ""; } }
void CheckmonkeyBacktoPosition() { if (setPosButtonScript.chaPos1 == "monkey") { Debug.Log("setPosButtonScript.chaPos1 == monkey"); //pos1Check.pos1BoolChange(); pos1Check.pos1IsFree = true; this.audio.Play(); pauseBarScript.scaleNoCha(); pauseEndScript.scaleNoCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos1 = ""; checkLowerChaPos(); if (monkeyWasArrestedBefore == true) { money.audio.Play(); money.refund(20000); handCuffs_monkey.renderer.enabled = true; PlayerPrefs.SetInt("monkeyArrested", 1); monkeyWasArrestedBefore = false; } } else if (setPosButtonScript.chaPos2 == "monkey") { Debug.Log("setPosButtonScript.chaPos2 == monkey"); //pos2Check.pos2BoolChange(); pos2Check.pos2IsFree = true; this.audio.Play(); pauseBarScript.scaleOneCha(); pauseEndScript.scaleOneCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos2 = ""; checkLowerChaPos(); if (monkeyWasArrestedBefore == true) { money.audio.Play(); money.refund(20000); handCuffs_monkey.renderer.enabled = true; PlayerPrefs.SetInt("monkeyArrested", 1); monkeyWasArrestedBefore = false; } } else if (setPosButtonScript.chaPos3 == "monkey") { Debug.Log("setPosButtonScript.chaPos3 == monkey"); //pos3Check.pos3BoolChange(); pos3Check.pos3IsFree = true; this.audio.Play(); pauseBarScript.scaleTwoCha(); pauseEndScript.scaleTwoCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos3 = ""; checkLowerChaPos(); if (monkeyWasArrestedBefore == true) { money.audio.Play(); money.refund(20000); handCuffs_monkey.renderer.enabled = true; PlayerPrefs.SetInt("monkeyArrested", 1); monkeyWasArrestedBefore = false; } } else if (setPosButtonScript.chaPos4 == "monkey") { Debug.Log("setPosButtonScript.chaPos4 == monkey"); //pos4Check.pos4BoolChange(); pos4Check.pos4IsFree = true; this.audio.Play(); pauseBarScript.scaleThreeCha(); pauseEndScript.scaleThreeCha(); transform.position = monkeyBW.transform.position; monkeyIsOnShelf = false; setPosButtonScript.chaPos4 = ""; if (monkeyWasArrestedBefore == true) { money.audio.Play(); money.refund(20000); handCuffs_monkey.renderer.enabled = true; PlayerPrefs.SetInt("monkeyArrested", 1); monkeyWasArrestedBefore = false; } } }
void CheckgorillaBacktoPosition() { if (setPosButtonScript.chaPos1 == "gorilla") { Debug.Log("setPosButtonScript.chaPos1 == gorilla"); //pos1Check.pos1BoolChange(); pos1Check.pos1IsFree = true; this.audio.Play(); pauseBarScript.scaleNoCha(); pauseEndScript.scaleNoCha(); transform.position = gorillaBW.transform.position; gorillaIsOnShelf = false; setPosButtonScript.chaPos1 = ""; money.audio.Play(); money.refund(20000); checkLowerChaPos(); } else if (setPosButtonScript.chaPos2 == "gorilla") { Debug.Log("setPosButtonScript.chaPos2 == gorilla"); //pos2Check.pos2BoolChange(); pos2Check.pos2IsFree = true; this.audio.Play(); pauseBarScript.scaleOneCha(); pauseEndScript.scaleOneCha(); transform.position = gorillaBW.transform.position; gorillaIsOnShelf = false; setPosButtonScript.chaPos2 = ""; money.audio.Play(); money.refund(10000); checkLowerChaPos(); } else if (setPosButtonScript.chaPos3 == "gorilla") { Debug.Log("setPosButtonScript.chaPos3 == gorilla"); //pos3Check.pos3BoolChange(); pos3Check.pos3IsFree = true; this.audio.Play(); pauseBarScript.scaleTwoCha(); pauseEndScript.scaleTwoCha(); transform.position = gorillaBW.transform.position; gorillaIsOnShelf = false; setPosButtonScript.chaPos3 = ""; money.audio.Play(); money.refund(10000); checkLowerChaPos(); } else if (setPosButtonScript.chaPos4 == "gorilla") { Debug.Log("setPosButtonScript.chaPos4 == gorilla"); //pos4Check.pos4BoolChange(); pos4Check.pos4IsFree = true; this.audio.Play(); pauseBarScript.scaleThreeCha(); pauseEndScript.scaleThreeCha(); transform.position = gorillaBW.transform.position; gorillaIsOnShelf = false; setPosButtonScript.chaPos4 = ""; money.audio.Play(); money.refund(10000); } }