Make RandomSeed a property, not a bindable

This commit is contained in:
ekrctb
2020-12-02 20:53:47 +09:00
parent 5936a8ffb4
commit fdcfa81e46
6 changed files with 27 additions and 41 deletions

View File

@ -99,9 +99,9 @@ namespace osu.Game.Rulesets.Catch.Objects
/// <summary>
/// The seed value used for visual randomness such as fruit rotation.
/// By default, <see cref="HitObject.StartTime"/> truncated to an integer is used.
/// The value is <see cref="HitObject.StartTime"/> truncated to an integer.
/// </summary>
public Bindable<int> RandomSeed = new Bindable<int>();
public int RandomSeed => (int)StartTime;
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
@ -117,10 +117,6 @@ namespace osu.Game.Rulesets.Catch.Objects
protected CatchHitObject()
{
XBindable.BindValueChanged(x => originalX = x.NewValue - xOffset);
StartTimeBindable.BindValueChanged(change =>
{
RandomSeed.Value = (int)change.NewValue;
}, true);
}
}
}