mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 13:22:55 +08:00
Merge pull request #23440 from peppy/drawable-hit-object-sync-animations
Fix hit object animations not being played back in sync
This commit is contained in:
commit
1d162d1d15
@ -30,7 +30,7 @@ using osuTK.Graphics;
|
||||
namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
[Cached(typeof(DrawableHitObject))]
|
||||
public abstract partial class DrawableHitObject : PoolableDrawableWithLifetime<HitObjectLifetimeEntry>
|
||||
public abstract partial class DrawableHitObject : PoolableDrawableWithLifetime<HitObjectLifetimeEntry>, IAnimationTimeReference
|
||||
{
|
||||
/// <summary>
|
||||
/// Invoked after this <see cref="DrawableHitObject"/>'s applied <see cref="HitObject"/> has had its defaults applied.
|
||||
@ -425,11 +425,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
|
||||
LifetimeEnd = double.MaxValue;
|
||||
|
||||
double transformTime = HitObject.StartTime - InitialLifetimeOffset;
|
||||
|
||||
clearExistingStateTransforms();
|
||||
|
||||
using (BeginAbsoluteSequence(transformTime))
|
||||
double initialTransformsTime = HitObject.StartTime - InitialLifetimeOffset;
|
||||
|
||||
AnimationStartTime.Value = initialTransformsTime;
|
||||
|
||||
using (BeginAbsoluteSequence(initialTransformsTime))
|
||||
UpdateInitialTransforms();
|
||||
|
||||
using (BeginAbsoluteSequence(StateUpdateTime))
|
||||
@ -721,6 +723,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
if (CurrentSkin != null)
|
||||
CurrentSkin.SourceChanged -= skinSourceChanged;
|
||||
}
|
||||
|
||||
public Bindable<double> AnimationStartTime { get; } = new BindableDouble();
|
||||
}
|
||||
|
||||
public abstract partial class DrawableHitObject<TObject> : DrawableHitObject
|
||||
|
Loading…
Reference in New Issue
Block a user