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 CheckRhinoBacktoPosition() { if (setPosButtonScript.chaPos1 == "rhino") { Debug.Log("setPosButtonScript.chaPos1 == rhino"); //pos1Check.pos1BoolChange(); pos1Check.pos1IsFree = true; this.audio.Play(); pauseBarScript.scaleNoCha(); pauseEndScript.scaleNoCha(); transform.position = rhinoBW.transform.position; rhinoIsOnShelf = false; setPosButtonScript.chaPos1 = ""; money.audio.Play(); money.refund(10000); checkLowerChaPos(); } else if (setPosButtonScript.chaPos2 == "rhino") { Debug.Log("setPosButtonScript.chaPos2 == rhino"); //pos2Check.pos2BoolChange(); pos2Check.pos2IsFree = true; this.audio.Play(); pauseBarScript.scaleOneCha(); pauseEndScript.scaleOneCha(); transform.position = rhinoBW.transform.position; rhinoIsOnShelf = false; setPosButtonScript.chaPos2 = ""; money.audio.Play(); money.refund(10000); checkLowerChaPos(); } else if (setPosButtonScript.chaPos3 == "rhino") { Debug.Log("setPosButtonScript.chaPos3 == rhino"); //pos3Check.pos3BoolChange(); pos3Check.pos3IsFree = true; this.audio.Play(); pauseBarScript.scaleTwoCha(); pauseEndScript.scaleTwoCha(); transform.position = rhinoBW.transform.position; rhinoIsOnShelf = false; setPosButtonScript.chaPos3 = ""; money.audio.Play(); money.refund(10000); checkLowerChaPos(); } else if (setPosButtonScript.chaPos4 == "rhino") { Debug.Log("setPosButtonScript.chaPos4 == rhino"); //pos4Check.pos4BoolChange(); pos4Check.pos4IsFree = true; this.audio.Play(); pauseBarScript.scaleThreeCha(); pauseEndScript.scaleThreeCha(); transform.position = rhinoBW.transform.position; rhinoIsOnShelf = false; setPosButtonScript.chaPos4 = ""; money.audio.Play(); money.refund(10000); } }