mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Enforce exception better
This commit is contained in:
@ -40,11 +40,11 @@ namespace osu.Game.Rulesets.Timing
|
||||
/// <param name="hitObject">The hit object to add.</param>
|
||||
public void Add(DrawableHitObject hitObject)
|
||||
{
|
||||
if (hitObject.RelativePositionAxes == Axes.None)
|
||||
throw new InvalidOperationException($"Make sure to set all {nameof(DrawableHitObject)}'s {nameof(RelativePositionAxes)} to some axis of relativity");
|
||||
|
||||
var target = adjustmentContainerFor(hitObject);
|
||||
|
||||
if (hitObject.RelativePositionAxes != target.ScrollingAxes)
|
||||
throw new InvalidOperationException($"Make sure to set all {nameof(DrawableHitObject)}'s {nameof(RelativePositionAxes)} are equal to the correct axes of scrolling ({target.ScrollingAxes}).");
|
||||
|
||||
if (target == null)
|
||||
throw new ArgumentException("No speed adjustment could be found that can contain the hit object.", nameof(hitObject));
|
||||
|
||||
|
Reference in New Issue
Block a user