Add test case of DHO setting LifetimeStart in OnApply

This commit is contained in:
ekrctb
2021-05-28 21:51:48 +09:00
parent 68c5f4813e
commit 265dfe5416
2 changed files with 24 additions and 0 deletions

View File

@ -37,6 +37,8 @@ namespace osu.Game.Rulesets.Objects
startTimeBindable.BindTo(HitObject.StartTimeBindable);
startTimeBindable.BindValueChanged(_ => setInitialLifetime(), true);
// It is important to subscribe to this event before applied to a DrawableHitObject.
// Otherwise DHO cannot overwrite LifetimeStart set in setInitialLifetime.
HitObject.DefaultsApplied += _ => setInitialLifetime();
}