mirror of
https://github.com/ppy/osu.git
synced 2026-05-21 18:10:40 +08: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);
|
||||
// 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();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
isStrong.BindTo(HitObject.IsStrongBindable);
|
||||
// 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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user