mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 15:02:55 +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()
|
protected override Framework.Graphics.Drawable CreateIcon()
|
||||||
{
|
{
|
||||||
return icon = new Sprite
|
return icon ?? (icon = new Sprite
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
Loading…
Reference in New Issue
Block a user