private void Awake() { screenWipe = FindObjectOfType <ScreenWipe> (); DontDestroyOnLoad(gameObject); LoadScene(); }
public void LateUpdate() { ScreenWipe wipeSettings = CameraManager.Instance.CameraController.GetModifiablePostProcessSettings <ScreenWipe>(); if (wipeSettings != null) { wipeSettings.blend.value = LevelBlend; } }
void DoWipe( ScreenWipe.TransitionType transitionType ) { if (inProgress) return; inProgress = true; swap = !swap; StartCoroutine( ScreenWipe.use.SquishWipe (swap? camera1 : camera2, swap? camera2 : camera1, wipeTime, transitionType, curve) ); inProgress = false; }
void DoWipe( ScreenWipe.ZoomType zoom ) { if (inProgress) return; inProgress = true; swap = !swap; StartCoroutine( ScreenWipe.use.ShapeWipe (swap? camera1 : camera2, swap? camera2 : camera1, wipeTime, zoom, shapeMesh[useShape], rotateAmount, null ) ); inProgress = false; }
void Awake() { if (use) { Debug.LogWarning("Only one instance of ScreenCrossFadePro is allowed"); return; } use = this; this.enabled = false; }
//This is a dumb implementation of singleton void Awake () { if (use) { Debug.LogWarning("Only one instance of ScreenCrossFadePro is allowed"); return; } use = this; this.enabled = false; }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } instance = this; DontDestroyOnLoad(this.gameObject); screenWipe = FindObjectOfType <ScreenWipe> (); LoadScene(); }
public void SpawnScreenWipe(float lifespan, string message, System.Action onEndAction = null) { ScreenWipe sw = Instantiate(screenWipe); sw.GetComponent <Canvas>().worldCamera = Camera.main; if (onEndAction != null) { sw.Setup(lifespan, message, onEndAction); } else { sw.Setup(lifespan, message); } }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } instance = this; DontDestroyOnLoad(this.gameObject); transitionAnim = GetComponentInChildren <Animator> (); transitionAnim.SetFloat("Time", wipeSpeed); }
IEnumerator DoWipe( ScreenWipe.ZoomType zoom ) { if( inProgress == true ) { return false; } // Debug.Log("DoWipe here!"); inProgress = true; swap = !swap; yield return StartCoroutine( ScreenWipe.use.RectWipe(swap? camera1 : camera2, swap? camera2 : camera1, wipeTime, zoom, curve ) ); inProgress = false; }