Use events instead of overriding Add (catch)

This commit is contained in:
ekrctb
2020-11-20 17:25:57 +09:00
parent c013cd11c9
commit 468b2a97cb
3 changed files with 6 additions and 14 deletions

View File

@ -47,8 +47,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
switch (hitObject)
{
case CatchHitObject catchObject:
return createDrawableRepresentation?.Invoke(catchObject)?.With(o =>
((DrawableCatchHitObject)o).CheckPosition = p => CheckPosition?.Invoke(p) ?? false);
return createDrawableRepresentation?.Invoke(catchObject);
}
throw new ArgumentException($"{nameof(hitObject)} must be of type {nameof(CatchHitObject)}.");