mirror of
https://github.com/ppy/osu.git
synced 2025-03-01 23:32:57 +08:00
fix inspect code issues and cleanup code
This commit is contained in:
parent
dde64adcb5
commit
e66f6e8f91
@ -11,8 +11,6 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
{
|
{
|
||||||
public class BeatmapBackgroundWithStoryboard : BeatmapBackground
|
public class BeatmapBackgroundWithStoryboard : BeatmapBackground
|
||||||
{
|
{
|
||||||
private DrawableStoryboard storyboard;
|
|
||||||
|
|
||||||
public BeatmapBackgroundWithStoryboard(WorkingBeatmap beatmap, string fallbackTextureName = "Backgrounds/bg1")
|
public BeatmapBackgroundWithStoryboard(WorkingBeatmap beatmap, string fallbackTextureName = "Backgrounds/bg1")
|
||||||
: base(beatmap, fallbackTextureName)
|
: base(beatmap, fallbackTextureName)
|
||||||
{
|
{
|
||||||
@ -21,20 +19,19 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
var clock = new InterpolatingFramedClock(Beatmap.Track);
|
|
||||||
LoadComponentAsync(new DrawableStoryboard(Beatmap.Storyboard)
|
LoadComponentAsync(new DrawableStoryboard(Beatmap.Storyboard)
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Clock = clock,
|
Clock = new InterpolatingFramedClock(Beatmap.Track),
|
||||||
},
|
},
|
||||||
loaded =>
|
loaded =>
|
||||||
{
|
{
|
||||||
AddInternal(storyboard = loaded);
|
AddInternal(loaded);
|
||||||
storyboard.FadeIn(300, Easing.OutQuint);
|
loaded.FadeIn(300, Easing.OutQuint);
|
||||||
|
|
||||||
if (Beatmap.Storyboard.ReplacesBackground)
|
if (Beatmap.Storyboard.ReplacesBackground)
|
||||||
Sprite.FadeOut(300, Easing.OutQuint);
|
Sprite.FadeOut(300, Easing.OutQuint);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user