1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:23:20 +08:00

Reset win screen video on display; add fade in transition

This commit is contained in:
Dean Herbert 2020-03-08 14:23:13 +09:00
parent 4d74493289
commit a85cef2f06
2 changed files with 17 additions and 2 deletions

View File

@ -60,6 +60,8 @@ namespace osu.Game.Tournament.Components
}
}
public void Reset() => manualClock.CurrentTime = 0;
protected override void Update()
{
base.Update();

View File

@ -62,7 +62,9 @@ namespace osu.Game.Tournament.Screens.TeamWin
update();
}
private void update()
private bool firstDisplay = true;
private void update() => Schedule(() =>
{
var match = currentMatch.Value;
@ -75,6 +77,15 @@ namespace osu.Game.Tournament.Screens.TeamWin
redWinVideo.Alpha = match.WinnerColour == TeamColour.Red ? 1 : 0;
blueWinVideo.Alpha = match.WinnerColour == TeamColour.Blue ? 1 : 0;
if (firstDisplay)
{
if (match.WinnerColour == TeamColour.Red)
redWinVideo.Reset();
else
blueWinVideo.Reset();
firstDisplay = false;
}
mainContainer.Children = new Drawable[]
{
new DrawableTeamFlag(match.Winner)
@ -108,6 +119,8 @@ namespace osu.Game.Tournament.Screens.TeamWin
}
},
};
}
mainContainer.FadeOut();
mainContainer.Delay(2000).FadeIn(1600, Easing.OutQuint);
});
}
}