Fix trackign alpha not being applied

This commit is contained in:
Dean Herbert 2020-08-01 00:27:00 +09:00
parent 9e244be489
commit bb01ee5be9
1 changed files with 13 additions and 6 deletions

View File

@ -100,13 +100,20 @@ protected override void Update()
{
base.Update();
if (drawableSpinner.RotationTracker.Complete.Value && checkNewRotationCount)
if (drawableSpinner.RotationTracker.Complete.Value)
{
fill.FinishTransforms(false, nameof(Alpha));
fill
.FadeTo(tracking_alpha + 0.2f, 60, Easing.OutExpo)
.Then()
.FadeTo(tracking_alpha, 250, Easing.OutQuint);
if (checkNewRotationCount)
{
fill.FinishTransforms(false, nameof(Alpha));
fill
.FadeTo(tracking_alpha + 0.2f, 60, Easing.OutExpo)
.Then()
.FadeTo(tracking_alpha, 250, Easing.OutQuint);
}
}
else
{
fill.Alpha = (float)Interpolation.Damp(fill.Alpha, drawableSpinner.RotationTracker.Tracking ? tracking_alpha : idle_alpha, 0.98f, (float)Clock.ElapsedFrameTime);
}
const float initial_scale = 0.2f;