mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Implement UnbindFrom()
This commit is contained in:
@ -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 };
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user