Example #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Room"))
        {
            vcam          = other.GetComponentInChildren <CinemachineVirtualCamera>();
            vcam.Priority = 10;
            if (currCam != null && currCam != vcam)
            {
                currCam.Priority = 0;
                currCam          = vcam;
                stateMachine.ChangeState(typeof(PlayerTransitionState));
            }
            else
            {
                currCam = vcam;
            }

            respawn.SetLastRoomVisited(other.GetComponentInParent <TempleRoom>());
        }
    }