mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
Re-implement strong judgements via hitobject
This commit is contained in:
parent
fa3c919e2e
commit
2dff04392e
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
|
13
osu.Game.Rulesets.Taiko/Objects/StrongHitObject.cs
Normal file
13
osu.Game.Rulesets.Taiko/Objects/StrongHitObject.cs
Normal 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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user