Make hitobjects only have one judgement + result

This commit is contained in:
smoogipoo
2018-08-03 15:38:48 +09:00
parent 0da6c8c1a7
commit 2a4994e5ce
29 changed files with 66 additions and 110 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
@ -11,6 +10,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public override FruitVisualRepresentation VisualRepresentation => FruitVisualRepresentation.Banana;
protected override IEnumerable<Judgement> CreateJudgements() => new[] { new CatchBananaJudgement() };
protected override Judgement CreateJudgement() => new CatchBananaJudgement();
}
}

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Linq;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Graphics;
@ -57,8 +56,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
{
if (CheckPosition == null) return;
if (timeOffset >= 0 && Results.Count > 0)
ApplyResult(Results.Single(), r => r.Type = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
if (timeOffset >= 0 && Result != null)
ApplyResult(r => r.Type = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
}
protected override void SkinChanged(ISkinSource skin, bool allowFallback)

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
@ -9,6 +8,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public class Droplet : CatchHitObject
{
protected override IEnumerable<Judgement> CreateJudgements() => new[] { new CatchDropletJudgement() };
protected override Judgement CreateJudgement() => new CatchDropletJudgement();
}
}

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
@ -9,6 +8,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public class Fruit : CatchHitObject
{
protected override IEnumerable<Judgement> CreateJudgements() => new[] { new CatchJudgement() };
protected override Judgement CreateJudgement() => new CatchJudgement();
}
}

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
@ -9,6 +8,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public class TinyDroplet : Droplet
{
protected override IEnumerable<Judgement> CreateJudgements() => new[] { new CatchTinyDropletJudgement() };
protected override Judgement CreateJudgement() => new CatchTinyDropletJudgement();
}
}