Ejemplo n.º 1
0
    private IEnumerator CoFadeInVignette(float duration)
    {
        canvas.SetActive(true);

        for (float time = 0; time < duration; time += Time.deltaTime)
        {
            SetVignetteAlpha(MathX.EaseOutQuad(0, vignetteColor.a, time / duration));
            yield return(null);
        }
    }
Ejemplo n.º 2
0
    private IEnumerator CoDeselect()
    {
        for (float time = t * duration; time >= 0; time -= Time.deltaTime)
        {
            t = time / duration;
            SetLocalPosition(distance * MathX.EaseOutQuad(0, 1, t));
            yield return(null);
        }

        t = 0;
        SetLocalPosition(Vector3.zero);
    }
Ejemplo n.º 3
0
    private IEnumerator CoFadeOut()
    {
        for (float time = 0; time < fadeDuration; time += Time.deltaTime)
        {
            messageBubbleCanvasGroup.alpha = MathX.EaseOutQuad(1, 0, time / fadeDuration);
            yield return(null);
        }

        messageBubble.gameObject.SetActive(false);
        messageBubbleCanvasGroup.alpha = 1f;
        fadeOutRoutine = null;
    }
Ejemplo n.º 4
0
    private IEnumerator CoSelect()
    {
        for (float time = t * duration; time < duration; time += Time.deltaTime)
        {
            t = time / duration;
            SetLocalPosition(distance * MathX.EaseOutQuad(0, 1, t));
            yield return(null);
        }

        t = 1;
        SetLocalPosition(distance);
    }