// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.A)) { mixer.blendCamera(cameras[0], 10.0f, Interpolators.bounceInOut); } if (Input.GetKey(KeyCode.S)) { mixer.blendCamera(cameras[1], 5.0f, Interpolators.circularIn); } if (Input.GetKey(KeyCode.D)) { mixer.blendCamera(cameras[2], 3.0f, Interpolators.expoIn); } }
IEnumerator BlendCameraCoroutine() { mixer.blendCamera(cameras[camPos], time, Interpolators.quartIn); yield return(new WaitForSeconds(time)); //camPos = camPos >= cameras.Length ? 0 : camPos++; camPos++; if (camPos >= cameras.Length) { camPos = 0; } StartCoroutine(BlendCameraCoroutine()); }
public void changeCamera() { //mainCamera.enabled = true; //cameraPlayer.enabled = false; mixer.blendCamera(mainCamera, 5f, Interpolators.bounceInOut); }