Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            GarageCameraController.CamPos currPos = camController.myCamPos;
            GarageCameraController.CamPos nextPos;
            if ((int)currPos == index)
            {
                nextPos = GarageCameraController.CamPos.FirstPos;
            }
            else
            {
                nextPos = GarageCameraController.CamPos.SecondPos;
            }

            camController.ChangeCameras(currPos, nextPos);
        }
    }