mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Make SetInitialLifetime public
This commit is contained in:
@ -35,11 +35,11 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
|
|
||||||
startTimeBindable.BindTo(HitObject.StartTimeBindable);
|
startTimeBindable.BindTo(HitObject.StartTimeBindable);
|
||||||
startTimeBindable.BindValueChanged(_ => setInitialLifetime(), true);
|
startTimeBindable.BindValueChanged(_ => SetInitialLifetime(), true);
|
||||||
|
|
||||||
// Subscribe to this event before the DrawableHitObject so that the local callback is invoked before the entry is re-applied as a result of DefaultsApplied.
|
// Subscribe to this event before the DrawableHitObject so that the local callback is invoked before the entry is re-applied as a result of DefaultsApplied.
|
||||||
// This way, the DrawableHitObject can use OnApply() to overwrite the LifetimeStart that was set inside setInitialLifetime().
|
// This way, the DrawableHitObject can use OnApply() to overwrite the LifetimeStart that was set inside setInitialLifetime().
|
||||||
HitObject.DefaultsApplied += _ => setInitialLifetime();
|
HitObject.DefaultsApplied += _ => SetInitialLifetime();
|
||||||
}
|
}
|
||||||
|
|
||||||
// The lifetime, as set by the hitobject.
|
// The lifetime, as set by the hitobject.
|
||||||
@ -94,6 +94,6 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set <see cref="LifetimeEntry.LifetimeStart"/> using <see cref="InitialLifetimeOffset"/>.
|
/// Set <see cref="LifetimeEntry.LifetimeStart"/> using <see cref="InitialLifetimeOffset"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void setInitialLifetime() => LifetimeStart = HitObject.StartTime - InitialLifetimeOffset;
|
public void SetInitialLifetime() => LifetimeStart = HitObject.StartTime - InitialLifetimeOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user