1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:59:35 +08:00

Make sure icon is only instantiated once.

This commit is contained in:
smoogipooo 2017-03-24 15:43:17 +09:00
parent aa9a65d69c
commit eea24b2d82

View File

@ -18,11 +18,11 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
protected override Framework.Graphics.Drawable CreateIcon()
{
return icon = new Sprite
return icon ?? (icon = new Sprite
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
};
});
}
[BackgroundDependencyLoader]