Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player") && floor.CanGoIn(roomNumber, entrance))
     {
         Vector3 otherSidePosition = new Vector3(otherSide.localPosition.x, other.transform.position.y, otherSide.localPosition.z);
         other.gameObject.transform.position = otherSidePosition;
     }
     else if (other.CompareTag("Player"))
     {
         gameController.setMessage("Esta porta está trancada");
     }
 }