Exemple #1
0
    public void StartFadeOverTime(FadeDir dir, Action action)
    {
        if (action != null) {
            action();
        }

        _fading = true;
        _fadeDir = dir;
        _currentTime = 0;
    }
Exemple #2
0
 public void StartFadeOverTime(FadeDir dir)
 {
     if (PreviousScene.screenshot != null) {
       //  image.texture = PreviousScene.screenshot;
     }
     _alpha = Canvas.alpha;
     fading = true;
     currentTime = 0;
     fadeDir = dir;
 }
Exemple #3
0
    public void StartFadeOverTime(FadeDir dir, Action action)
    {
        if (action != null)
        {
            action();
        }

        _fading      = true;
        _fadeDir     = dir;
        _currentTime = 0;
    }
Exemple #4
0
 public void StartFadeOverTime(FadeDir dir)
 {
     if (PreviousScene.screenshot != null)
     {
         //  image.texture = PreviousScene.screenshot;
     }
     _alpha      = Canvas.alpha;
     fading      = true;
     currentTime = 0;
     fadeDir     = dir;
 }
Exemple #5
0
        void Fade(FadeDir dir)
        {
            // don't do anything if we're already fading in the same direction
            // or are already faded in completely in that direction
            if (_fadeDir == dir)
            {
                return;
            }

            // start a new fade
            _timer       = 0.0f;
            _timeFactor  = 1.0f / fadeDuration; // we could calculate this only at the start but what if the user changes the duration
            _startWeight = _currentWeight;
            _fadeDir     = dir;
            _fadeRunning = true;
        }