mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 09:20:02 +09:00
Run RecreatePieces
using AddOnce
to avoid multiple unnecessary calls
This commit is contained in:
@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
{
|
{
|
||||||
type.BindTo(HitObject.TypeBindable);
|
type.BindTo(HitObject.TypeBindable);
|
||||||
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
|
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
|
||||||
type.BindValueChanged(_ => RecreatePieces());
|
type.BindValueChanged(_ => Scheduler.AddOnce(RecreatePieces));
|
||||||
|
|
||||||
base.OnApply();
|
base.OnApply();
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
{
|
{
|
||||||
isStrong.BindTo(HitObject.IsStrongBindable);
|
isStrong.BindTo(HitObject.IsStrongBindable);
|
||||||
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
|
// this doesn't need to be run inline as RecreatePieces is called by the base call below.
|
||||||
isStrong.BindValueChanged(_ => RecreatePieces());
|
isStrong.BindValueChanged(_ => Scheduler.AddOnce(RecreatePieces));
|
||||||
|
|
||||||
base.OnApply();
|
base.OnApply();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user