protected void RunSelf(MainCamera mainCam, float _time) { if (mainCam == null) { return; } mainCam.StopCrossfade(); if (fadeType == FadeType.fadeIn) { if (isInstant) { mainCam.FadeIn(0f); } else { mainCam.FadeIn(_time, forceCompleteTransition); } } else { Texture2D texToUse = tempTexture; if (!setTexture) { texToUse = null; } float timeToFade = _time; if (isInstant) { timeToFade = 0f; } mainCam.FadeOut(timeToFade, texToUse, forceCompleteTransition); } }
private void RunSelf (MainCamera mainCam, float _time) { if (mainCam == null) { return; } mainCam.StopCrossfade (); if (fadeType == FadeType.fadeIn) { if (isInstant) { mainCam.FadeIn (0f); } else { mainCam.FadeIn (_time); } } else { Texture2D texToUse = tempTexture; if (!setTexture) { texToUse = null; } float timeToFade = _time; if (isInstant) { timeToFade = 0f; } mainCam.FadeOut (timeToFade, texToUse); } }
protected void RunSelf(MainCamera mainCam, float _time) { if (mainCam == null) { return; } mainCam.StopCrossfade(); if (isInstant) { _time = 0f; } if (fadeType == FadeType.fadeIn) { mainCam.FadeIn(_time, forceCompleteTransition, cameraFadePauseBehaviour, fadeCurve); } else { Texture2D texToUse = (setTexture) ? tempTexture : null; mainCam.FadeOut(_time, texToUse, forceCompleteTransition, cameraFadePauseBehaviour, fadeCurve); } }