예제 #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);
        }
    }
예제 #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);
    }
예제 #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;
    }
예제 #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);
    }