mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 06:32:55 +08:00
Move OkResult
from drawable swell to judgement
This commit is contained in:
parent
bcb9cba2d7
commit
f47b74a938
@ -9,6 +9,11 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
public class TaikoSwellJudgement : TaikoJudgement
|
public class TaikoSwellJudgement : TaikoJudgement
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The <see cref="HitResult"/> to grant when the player has hit more than half of swell ticks.
|
||||||
|
/// </summary>
|
||||||
|
public virtual HitResult OkResult => HitResult.Ok;
|
||||||
|
|
||||||
protected override double HealthIncreaseFor(HitResult result)
|
protected override double HealthIncreaseFor(HitResult result)
|
||||||
{
|
{
|
||||||
switch (result)
|
switch (result)
|
||||||
|
@ -137,6 +137,8 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
private class TaikoClassicSwellJudgement : TaikoSwellJudgement
|
private class TaikoClassicSwellJudgement : TaikoSwellJudgement
|
||||||
{
|
{
|
||||||
public override HitResult MaxResult => HitResult.LargeBonus;
|
public override HitResult MaxResult => HitResult.LargeBonus;
|
||||||
|
|
||||||
|
public override HitResult OkResult => HitResult.SmallBonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ClassicSwell : Swell
|
private class ClassicSwell : Swell
|
||||||
@ -156,8 +158,6 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
private class ClassicDrawableSwell : DrawableSwell
|
private class ClassicDrawableSwell : DrawableSwell
|
||||||
{
|
{
|
||||||
public override bool DisplayResult => false;
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
protected override HitResult OkResult => HitResult.SmallBonus;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -16,7 +16,7 @@ using osuTK.Graphics;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Taiko.Judgements;
|
||||||
using osu.Game.Rulesets.Taiko.Skinning.Default;
|
using osu.Game.Rulesets.Taiko.Skinning.Default;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
|
||||||
@ -34,7 +34,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const double ring_appear_offset = 100;
|
private const double ring_appear_offset = 100;
|
||||||
|
|
||||||
protected virtual HitResult OkResult => HitResult.Ok;
|
|
||||||
private readonly Container<DrawableSwellTick> ticks;
|
private readonly Container<DrawableSwellTick> ticks;
|
||||||
private readonly Container bodyContainer;
|
private readonly Container bodyContainer;
|
||||||
private readonly CircularContainer targetRing;
|
private readonly CircularContainer targetRing;
|
||||||
@ -223,7 +222,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
tick.TriggerResult(false);
|
tick.TriggerResult(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyResult(r => r.Type = numHits > HitObject.RequiredHits / 2 ? OkResult : r.Judgement.MinResult);
|
ApplyResult(r =>
|
||||||
|
{
|
||||||
|
var swellJudgement = (TaikoSwellJudgement)r.Judgement;
|
||||||
|
r.Type = numHits > HitObject.RequiredHits / 2 ? swellJudgement.OkResult : swellJudgement.MinResult;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user