public Transition_Fade(Vector3 endPoint, float duration, GameObject parent) { this.endPoint = endPoint; this.duration = duration; progress = 0; moved = false; // create fade effect fadeEffects = ScreenFade.AttachToAllCameras(); foreach (ScreenFade fade in fadeEffects) { fade.FadeColour = Color.black; } }
public void Start() { // get current scene number and maximum scene index sceneIndex = SceneManager.GetActiveScene().buildIndex; currentSceneIndex = sceneIndex; maxSceneIndex = SceneManager.sceneCountInBuildSettings - 1; // fade in fadeLevel = 1; fadeTime = -1; // create screen faders faders = ScreenFade.AttachToAllCameras(); // create action handlers for next/prev scene selection actionNext = InputHandler.Find(actionNameNext); actionPrev = InputHandler.Find(actionNamePrev); }