Пример #1
0
        private static IEnumerator ChangeStarInnerRadius(QuickPolygon shape, float endValue, InterpolateType interpolateType, float duration)
        {
            float startValue  = shape.GetStarInnerRadius();
            float timeElapsed = 0;

            while (timeElapsed < duration)
            {
                float newvalue = GetInterpolate(interpolateType, startValue, endValue, timeElapsed, duration);
                shape.SetStarInnerRadius(newvalue, true);
                yield return(new WaitForEndOfFrame());

                timeElapsed += Time.deltaTime;
            }
            shape.SetStarInnerRadius(endValue, true);
        }