Re-implement strong judgements via hitobject

This commit is contained in:
smoogipoo 2018-08-03 16:11:57 +09:00
parent fa3c919e2e
commit 2dff04392e
5 changed files with 55 additions and 2 deletions

View File

@ -0,0 +1,19 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
public abstract class DrawableStrongHitObject : DrawableTaikoHitObject
{
protected DrawableStrongHitObject(StrongHitObject strong)
: base(strong)
{
}
protected override void UpdateState(ArmedState state)
{
}
}
}

View File

@ -101,6 +101,17 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
Content.Add(MainPiece = CreateMainPiece());
MainPiece.KiaiMode = HitObject.Kiai;
var strongObject = HitObject.NestedHitObjects.OfType<StrongHitObject>().FirstOrDefault();
if (strongObject != null)
{
var vis = CreateStrongObject(strongObject);
if (vis != null)
{
AddNested(vis);
AddInternal(vis);
}
}
}
// Normal and clap samples are handled by the drum
@ -109,5 +120,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected override string SampleNamespace => "Taiko";
protected virtual TaikoPiece CreateMainPiece() => new CirclePiece();
protected virtual DrawableStrongHitObject CreateStrongObject(StrongHitObject hitObject) => null;
}
}

View File

@ -54,12 +54,12 @@ namespace osu.Game.Rulesets.Taiko.Objects
protected override void CreateNestedHitObjects()
{
base.CreateNestedHitObjects();
createTicks();
RequiredGoodHits = NestedHitObjects.Count * Math.Min(0.15, 0.05 + 0.10 / 6 * overallDifficulty);
RequiredGreatHits = NestedHitObjects.Count * Math.Min(0.30, 0.10 + 0.20 / 6 * overallDifficulty);
base.CreateNestedHitObjects();
}
private void createTicks()

View File

@ -0,0 +1,13 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Taiko.Judgements;
namespace osu.Game.Rulesets.Taiko.Objects
{
public class StrongHitObject : TaikoHitObject
{
protected override Judgement CreateJudgement() => new TaikoStrongHitJudgement();
}
}

View File

@ -30,6 +30,14 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// </summary>
public bool IsStrong;
protected override void CreateNestedHitObjects()
{
base.CreateNestedHitObjects();
if (IsStrong)
AddNested(new StrongHitObject());
}
protected override Judgement CreateJudgement() => new TaikoJudgement();
protected override HitWindows CreateHitWindows() => new TaikoHitWindows();