1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Expose animation start time as mutable in interface

This commit is contained in:
Bartłomiej Dach 2020-11-22 13:11:22 +01:00
parent 240c1b0aef
commit 1c31a4a6b6
4 changed files with 2 additions and 4 deletions

View File

@ -49,6 +49,5 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
} }
public Bindable<double> AnimationStartTime { get; } = new BindableDouble(); public Bindable<double> AnimationStartTime { get; } = new BindableDouble();
IBindable<double> IAnimationTimeReference.AnimationStartTime => AnimationStartTime;
} }
} }

View File

@ -68,7 +68,6 @@ namespace osu.Game.Tests.NonVisual.Skinning
public ManualClock ManualClock { get; } public ManualClock ManualClock { get; }
public IFrameBasedClock Clock { get; } public IFrameBasedClock Clock { get; }
public Bindable<double> AnimationStartTime { get; } = new BindableDouble(); public Bindable<double> AnimationStartTime { get; } = new BindableDouble();
IBindable<double> IAnimationTimeReference.AnimationStartTime => AnimationStartTime;
public TestAnimationTimeReference() public TestAnimationTimeReference()
{ {

View File

@ -26,6 +26,6 @@ namespace osu.Game.Skinning
/// <summary> /// <summary>
/// The time which animations should be started from, relative to <see cref="Clock"/>. /// The time which animations should be started from, relative to <see cref="Clock"/>.
/// </summary> /// </summary>
IBindable<double> AnimationStartTime { get; } Bindable<double> AnimationStartTime { get; }
} }
} }

View File

@ -85,7 +85,7 @@ namespace osu.Game.Skinning
if (timeReference != null) if (timeReference != null)
{ {
Clock = timeReference.Clock; Clock = timeReference.Clock;
((IBindable<double>)animationStartTime).BindTo(timeReference.AnimationStartTime); animationStartTime.BindTo(timeReference.AnimationStartTime);
} }
animationStartTime.BindValueChanged(_ => updatePlaybackPosition(), true); animationStartTime.BindValueChanged(_ => updatePlaybackPosition(), true);