Fix follow points not updating on positional changes

This commit is contained in:
smoogipoo
2020-11-20 15:31:04 +09:00
parent c53a8fafe6
commit 33eea64cfc
2 changed files with 81 additions and 8 deletions

View File

@ -21,16 +21,33 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
public FollowPointRenderer.FollowPointLifetimeEntry Entry;
public DrawablePool<FollowPoint> Pool;
protected override void FreeAfterUse()
{
base.FreeAfterUse();
ClearInternal(false);
}
protected override void PrepareForUse()
{
base.PrepareForUse();
Entry.Invalidated += onEntryInvalidated;
refreshPoints();
}
protected override void FreeAfterUse()
{
base.FreeAfterUse();
Entry.Invalidated -= onEntryInvalidated;
// Return points to the pool.
ClearInternal(false);
Entry = null;
}
private void onEntryInvalidated() => refreshPoints();
private void refreshPoints()
{
ClearInternal(false);
OsuHitObject start = Entry.Start;
OsuHitObject end = Entry.End;