void setCameraTask(VirtualCameraTarget cam) { if (camEvent != null) { StopCoroutine(camEvent); } cam.changeCameras(this); camEvent = StartCoroutine(lerpCamera(cam, setCurve, setDuration)); }
public void resetCameraTask(VirtualCameraTarget cam) { if (camEvent != null) { StopCoroutine(camEvent); } cam.changeCameras(cam.defaultCam); camEvent = StartCoroutine(lerpCamera(cam, cam.defaultCam.setCurve, cam.defaultCam.setDuration)); }