예제 #1
0
 //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;
 }
예제 #2
0
 //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;
     }
 }