//When the player enters the temple they're trapped in the arena public void TrapPlayer() { BarrierOne.GetComponent <BoxCollider2D>().isTrigger = false; BarrierTwo.GetComponent <BoxCollider2D>().isTrigger = false; BarrierOne.GetComponent <SpriteRenderer>().enabled = true; BarrierTwo.GetComponent <SpriteRenderer>().enabled = true; }
//When the activation animation happens, the player will be trapped into a box and forced to fight the enemy. public void TrapPlayer() { if (isMonkey) { BarrierTwo.GetComponent <BoxCollider2D>().isTrigger = false; } else { BarrierOne.GetComponent <BoxCollider2D>().isTrigger = false; BarrierTwo.GetComponent <BoxCollider2D>().isTrigger = false; } }