1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 23:22:54 +08:00

Remove osu!catch GotoFrame usage

This commit is contained in:
Dean Herbert 2020-03-30 17:26:35 +09:00
parent 0044d00d07
commit 4406f44165
2 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Timing;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
@ -379,7 +380,9 @@ namespace osu.Game.Rulesets.Catch.UI
}
currentCatcher.Show();
(currentCatcher.Drawable as IAnimation)?.GotoFrame(0);
if (currentCatcher.Drawable.Clock is FramedOffsetClock offsetClock)
offsetClock.Offset = -Time.Current;
}
private void beginTrail()

View File

@ -71,6 +71,8 @@ namespace osu.Game.Skinning
if (timeReference != null)
Clock = new FramedOffsetClock(timeReference.Clock) { Offset = -timeReference.AnimationStartTime };
else
Clock = new FramedOffsetClock(Clock);
}
}