Example #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;
 }
Example #2
0
 //When triggered, the boxes will disable and the player can leave.
 public void FreePlayer()
 {
     if (isMonkey)
     {
         BarrierOne.SetActive(false);
         BarrierTwo.SetActive(false);
     }
 }
Example #3
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;
     }
 }
Example #4
0
 //When triggered, the box will disable and the player can leave.
 public void FreePlayer()
 {
     BarrierTwo.SetActive(false);
 }