Example #1
0
    private void Awake()
    {
        screenWipe = FindObjectOfType <ScreenWipe> ();
        DontDestroyOnLoad(gameObject);

        LoadScene();
    }
Example #2
0
    public void LateUpdate()
    {
        ScreenWipe wipeSettings = CameraManager.Instance.CameraController.GetModifiablePostProcessSettings <ScreenWipe>();

        if (wipeSettings != null)
        {
            wipeSettings.blend.value = LevelBlend;
        }
    }
Example #3
0
    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;
    }
Example #4
0
    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;
    }
Example #5
0
    void Awake()
    {
        if (use)
        {
            Debug.LogWarning("Only one instance of ScreenCrossFadePro is allowed");
            return;
        }
        use = this;

        this.enabled = false;
    }
Example #6
0
    //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();
    }
Example #8
0
    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);
    }
Example #10
0
    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;
    }