mirror of
https://github.com/ppy/osu.git
synced 2026-06-05 17:54:14 +08:00
Make sure icon is only instantiated once.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user