//private float[] mFadeParams; public void Apply(CameraSwitcherKey camSwitcher, int frameRate, ITarget itarget, Camera[] allCameras, bool backwards) { if (mCamSwitcher != camSwitcher) { mCamSwitcher = camSwitcher; float[] fadeParams = mCamSwitcher.cameraFadeParameters.ToArray(); mIsReversed = Utility.isTransitionReversed(mCamSwitcher.type, fadeParams); mCam = mCamSwitcher.GetCamera(itarget); mCamEnd = mCamSwitcher.GetCameraEnd(itarget); mAllCams = allCameras; if (mCamSwitcher.cameraFadeType == (int)Fade.None) { mCamSwitcher.CameraFadeNoneTargets(mCamSwitcher.typeEnd, mCamSwitcher.colorEnd, mCamEnd, mAllCams); mCamSwitcher.CameraEnd(mIsReversed, mCam, mCamEnd, mAllCams); } else { mCamSwitcher.CameraGenerateFadeTargets(mIsReversed, mCam, mCamEnd, mAllCams, fadeParams); } } mBackwards = backwards; }
public void End() { mCamSwitcher.CameraEnd(mBackwards ? !mIsReversed : mIsReversed, mCam, mCamEnd, mAllCams); }