mirror of
https://github.com/osukey/osukey.git
synced 2025-05-04 05:07:23 +09:00
Minor implementation changes.
This commit is contained in:
parent
000c2218b8
commit
c8a7bd2ece
@ -180,7 +180,6 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
|
|
||||||
beatmapSource = osuGame?.Beatmap ?? new Bindable<WorkingBeatmap>();
|
beatmapSource = osuGame?.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||||
beatmapSource.ValueChanged += workingChanged;
|
|
||||||
playList = database.GetAllWithChildren<BeatmapSetInfo>();
|
playList = database.GetAllWithChildren<BeatmapSetInfo>();
|
||||||
|
|
||||||
backgroundSprite = getScaledSprite(fallbackTexture = game.Textures.Get(@"Backgrounds/bg4"));
|
backgroundSprite = getScaledSprite(fallbackTexture = game.Textures.Get(@"Backgrounds/bg4"));
|
||||||
@ -189,6 +188,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
|
beatmapSource.ValueChanged += workingChanged;
|
||||||
workingChanged();
|
workingChanged();
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
}
|
}
|
||||||
@ -201,7 +201,7 @@ namespace osu.Game.Overlays
|
|||||||
progress.UpdatePosition((float)(current.Track.CurrentTime / current.Track.Length));
|
progress.UpdatePosition((float)(current.Track.CurrentTime / current.Track.Length));
|
||||||
playButton.Icon = current.Track.IsRunning ? FontAwesome.pause : FontAwesome.play_circle_o;
|
playButton.Icon = current.Track.IsRunning ? FontAwesome.pause : FontAwesome.play_circle_o;
|
||||||
|
|
||||||
if (current.Track.HasCompleted) next();
|
if (current.Track.HasCompleted && !current.Track.Looping) next();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void workingChanged(object sender = null, EventArgs e = null)
|
private void workingChanged(object sender = null, EventArgs e = null)
|
||||||
@ -273,19 +273,14 @@ namespace osu.Game.Overlays
|
|||||||
newBackground.Position = new Vector2(400, 0);
|
newBackground.Position = new Vector2(400, 0);
|
||||||
newBackground.MoveToX(0, 500, EasingTypes.OutCubic);
|
newBackground.MoveToX(0, 500, EasingTypes.OutCubic);
|
||||||
backgroundSprite.MoveToX(-400, 500, EasingTypes.OutCubic);
|
backgroundSprite.MoveToX(-400, 500, EasingTypes.OutCubic);
|
||||||
backgroundSprite.Expire();
|
|
||||||
}
|
}
|
||||||
else if (isNext == false)
|
else if (isNext == false)
|
||||||
{
|
{
|
||||||
newBackground.Position = new Vector2(-400, 0);
|
newBackground.Position = new Vector2(-400, 0);
|
||||||
newBackground.MoveToX(0, 500, EasingTypes.OutCubic);
|
newBackground.MoveToX(0, 500, EasingTypes.OutCubic);
|
||||||
backgroundSprite.MoveToX(400, 500, EasingTypes.OutCubic);
|
backgroundSprite.MoveToX(400, 500, EasingTypes.OutCubic);
|
||||||
backgroundSprite.Expire();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
backgroundSprite.Expire();
|
|
||||||
}
|
}
|
||||||
|
backgroundSprite.Expire();
|
||||||
|
|
||||||
backgroundSprite = newBackground;
|
backgroundSprite = newBackground;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user