mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Add missing equality implementation for seasonal backgrounds
The equality operator is used to determine whether the next background in the cycle should be loaded, to avoid pointless loads of the same background several times (see #13362 and #13393). Its omission in the latter pull caused seasonal backgrounds to no longer cycle. Closes #13508.
This commit is contained in:
@ -99,5 +99,14 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
// ensure we're not loading in without a transition.
|
||||
this.FadeInFromZero(200, Easing.InOutSine);
|
||||
}
|
||||
|
||||
public override bool Equals(Background other)
|
||||
{
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
|
||||
return other.GetType() == GetType()
|
||||
&& ((SeasonalBackground)other).url == url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user