Пример #1
0
    // public AnimationCurve alphaOverTime;

    IEnumerator AnimateCircle()
    {
        float t = 0;

        while (t < animationDuration)
        {
            t += Time.deltaTime;

            float percent = t / animationDuration;

            radius = maxRadius * EZEasings.SmoothStop2(percent);

            Color lineColor = GetComponent <LineRenderer>().material.color;
            // float alpha = alphaOverTime.Evaluate(percent);
            // lineColor.a = alpha;
            line.material.color = lineColor;
            line.startColor     = lineColor;
            line.endColor       = lineColor;

            yield return(new WaitForEndOfFrame());
        }
        Destroy(gameObject);
    }
Пример #2
0
 public static float GetSmoothStop2Range(Property p, float t)
 {
     return(p.start + (p.end - p.start) * EZEasings.SmoothStop2(t));
 }