2016-10-06 22:32:35 +08:00
|
|
|
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2016-10-10 16:17:26 +08:00
|
|
|
|
using osu.Framework;
|
2016-10-06 22:32:35 +08:00
|
|
|
|
using osu.Game.Graphics.Background;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.GameModes.Backgrounds
|
|
|
|
|
{
|
|
|
|
|
public class BackgroundModeCustom : BackgroundMode
|
|
|
|
|
{
|
|
|
|
|
private readonly string textureName;
|
|
|
|
|
|
|
|
|
|
public BackgroundModeCustom(string textureName)
|
|
|
|
|
{
|
|
|
|
|
this.textureName = textureName;
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-10 16:17:26 +08:00
|
|
|
|
public override void Load(BaseGame game)
|
2016-10-06 22:32:35 +08:00
|
|
|
|
{
|
2016-10-10 16:17:26 +08:00
|
|
|
|
base.Load(game);
|
2016-10-06 22:32:35 +08:00
|
|
|
|
Add(new Background(textureName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(BackgroundMode other)
|
|
|
|
|
{
|
|
|
|
|
return base.Equals(other) && textureName == ((BackgroundModeCustom)other).textureName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|