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:
parent
aa9a65d69c
commit
eea24b2d82
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user