Пример #1
0
 void OnTriggerEnter(Collider other)
 {
     //Debug.Log(other.gameObject.name);
     if (other.tag == "triggerRoom" && other != c1)
     {
         if (Time.time > 1f && c1.GetComponent <roomClass>().isHallway)
         {
             EnableCamera(mainCam);
             mainCam.transform.position = c1.GetComponent <roomClass>().roomCam.transform.position;
         }
         roomClass rc = other.gameObject.GetComponent <roomClass>();
         walkDirection = rc.md;
         StartCoroutine(lerpCamera(rc.roomCam.transform, rc.isHallway));
         c1 = other;
     }
 }
Пример #2
0
 public void ChangeCamera(roomClass rc) //Allows camera change to be called by any script with the same method
 {
     walkDirection = rc.md;
     //EnableCamera(rc.roomCam);
     Debug.Log(rc.roomName);
 }