mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Update loop logic in line with framework changes
This commit is contained in:
@ -23,6 +23,11 @@ namespace osu.Game.Graphics.Containers
|
||||
/// </summary>
|
||||
protected double EarlyActivationMilliseconds;
|
||||
|
||||
/// <summary>
|
||||
/// The time in milliseconds until the next beat.
|
||||
/// </summary>
|
||||
public double TimeUntilNextBeat { get; private set; }
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
if (Beatmap.Value?.Track == null)
|
||||
@ -42,12 +47,12 @@ namespace osu.Game.Graphics.Containers
|
||||
if (currentTrackTime < timingPoint.Time)
|
||||
beatIndex--;
|
||||
|
||||
TimeUntilNextBeat = (timingPoint.Time - currentTrackTime) % timingPoint.BeatLength;
|
||||
|
||||
if (timingPoint == lastTimingPoint && beatIndex == lastBeat)
|
||||
return;
|
||||
|
||||
double offsetFromBeat = (timingPoint.Time - currentTrackTime) % timingPoint.BeatLength;
|
||||
|
||||
using (BeginDelayedSequence(offsetFromBeat, true))
|
||||
using (BeginDelayedSequence(TimeUntilNextBeat, true))
|
||||
OnNewBeat(beatIndex, timingPoint, effectPoint, Beatmap.Value.Track.CurrentAmplitudes);
|
||||
|
||||
lastBeat = beatIndex;
|
||||
|
@ -34,9 +34,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
spinner.RotateTo(360, 2000);
|
||||
using (spinner.BeginDelayedSequence(2000))
|
||||
spinner.Loop();
|
||||
using (spinner.BeginLoopedSequece())
|
||||
spinner.RotateTo(360, 2000);
|
||||
}
|
||||
|
||||
private const float transition_duration = 500;
|
||||
|
Reference in New Issue
Block a user