mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Implement UnbindFrom()
This commit is contained in:
parent
242982730f
commit
4b393209ec
@ -115,6 +115,17 @@ namespace osu.Game.Rulesets.Mods
|
||||
ExtendedMaxValue = otherDifficultyBindable.extendedMaxValue;
|
||||
}
|
||||
|
||||
public override void UnbindFrom(IUnbindable them)
|
||||
{
|
||||
if (!(them is DifficultyBindable otherDifficultyBindable))
|
||||
throw new InvalidOperationException($"Cannot unbind from a non-{nameof(DifficultyBindable)}.");
|
||||
|
||||
base.UnbindFrom(them);
|
||||
|
||||
CurrentNumber.UnbindFrom(otherDifficultyBindable.CurrentNumber);
|
||||
ExtendedLimits.UnbindFrom(otherDifficultyBindable.ExtendedLimits);
|
||||
}
|
||||
|
||||
public new DifficultyBindable GetBoundCopy() => new DifficultyBindable { BindTarget = this };
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user