Exemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if(other.gameObject.GetComponent("Client") != null) //You can change this script to any script that only the player has
     {
         Debug.Log("Colliding");
         if (TrapType == (int) Traps.LT_PIT)
         {
             Pit p = new Pit();
             p.Activate(character,SpawnPoint);
         }
         else if(TrapType == (int) Traps.LT_DOOR)
         {
             Door d = new Door();
             d.Activate(character,NextDoor);
         }
     }
 }