mirror of
https://github.com/ppy/osu
synced 2025-03-05 10:58:34 +00:00
Simplify property
This commit is contained in:
parent
714d53f329
commit
2ad6d3fa77
@ -53,7 +53,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
mods.ValueChanged += mods =>
|
mods.ValueChanged += mods =>
|
||||||
{
|
{
|
||||||
iconsContainer.Clear();
|
iconsContainer.Clear();
|
||||||
|
|
||||||
foreach (Mod mod in mods)
|
foreach (Mod mod in mods)
|
||||||
{
|
{
|
||||||
iconsContainer.Add(new ModIcon(mod)
|
iconsContainer.Add(new ModIcon(mod)
|
||||||
@ -68,28 +67,17 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool playIsRanked()
|
|
||||||
{
|
|
||||||
if (!mods.Value.Any()) return true;
|
|
||||||
|
|
||||||
foreach (var mod in mods.Value)
|
|
||||||
{
|
|
||||||
if (!mod.Ranked)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
appearTransform();
|
appearTransform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool playIsRanked => !mods.Value.Any(m => !m.Ranked);
|
||||||
|
|
||||||
private void appearTransform()
|
private void appearTransform()
|
||||||
{
|
{
|
||||||
if (!playIsRanked())
|
if (!playIsRanked)
|
||||||
unrankedText.FadeInFromZero(fade_duration, EasingTypes.OutQuint);
|
unrankedText.FadeInFromZero(fade_duration, EasingTypes.OutQuint);
|
||||||
else
|
else
|
||||||
unrankedText.FadeTo(0);
|
unrankedText.FadeTo(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user