Add support for changing animation start time after load

This commit is contained in:
Bartłomiej Dach
2020-11-21 20:06:30 +01:00
parent 81d0b42930
commit 240c1b0aef
5 changed files with 23 additions and 6 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
@ -47,6 +48,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
});
}
public double AnimationStartTime { get; set; }
public Bindable<double> AnimationStartTime { get; } = new BindableDouble();
IBindable<double> IAnimationTimeReference.AnimationStartTime => AnimationStartTime;
}
}

View File

@ -80,7 +80,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
fp.Alpha = 0;
fp.Scale = new Vector2(1.5f * end.Scale);
fp.AnimationStartTime = fadeInTime;
fp.AnimationStartTime.Value = fadeInTime;
using (fp.BeginAbsoluteSequence(fadeInTime))
{