mirror of https://github.com/ppy/osu
Use new hit results in osu
This commit is contained in:
parent
b1877b649b
commit
a77741927c
|
@ -146,7 +146,7 @@ public void TestSpinnerNormalBonusRewinding()
|
|||
{
|
||||
// multipled by 2 to nullify the score multiplier. (autoplay mod selected)
|
||||
var totalScore = ((ScoreExposedPlayer)Player).ScoreProcessor.TotalScore.Value * 2;
|
||||
return totalScore == (int)(drawableSpinner.RotationTracker.RateAdjustedRotation / 360) * SpinnerTick.SCORE_PER_TICK;
|
||||
return totalScore == (int)(drawableSpinner.RotationTracker.RateAdjustedRotation / 360) * new SpinnerTick().CreateJudgement().MaxNumericResult;
|
||||
});
|
||||
|
||||
addSeekStep(0);
|
||||
|
|
|
@ -7,10 +7,6 @@ namespace osu.Game.Rulesets.Osu.Judgements
|
|||
{
|
||||
public class OsuIgnoreJudgement : OsuJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
|
||||
protected override int NumericResultFor(HitResult result) => 0;
|
||||
|
||||
protected override double HealthIncreaseFor(HitResult result) => 0;
|
||||
public override HitResult MaxResult => HitResult.IgnoreHit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
using osu.Framework.Utils;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
@ -50,7 +49,7 @@ private void load()
|
|||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (sliderRepeat.StartTime <= Time.Current)
|
||||
ApplyResult(r => r.Type = drawableSlider.Tracking.Value ? HitResult.Great : HitResult.Miss);
|
||||
ApplyResult(r => r.Type = drawableSlider.Tracking.Value ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
|
||||
protected override void UpdateInitialTransforms()
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
@ -46,7 +45,7 @@ public DrawableSliderTail(Slider slider, SliderTailCircle hitCircle)
|
|||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered && timeOffset >= 0)
|
||||
ApplyResult(r => r.Type = Tracking ? r.Judgement.MaxResult : HitResult.Miss);
|
||||
ApplyResult(r => r.Type = Tracking ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
|
||||
private void updatePosition() => Position = HitObject.Position - slider.Position;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
|
@ -64,7 +63,7 @@ private void load()
|
|||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (timeOffset >= 0)
|
||||
ApplyResult(r => r.Type = Tracking ? r.Judgement.MaxResult : HitResult.Miss);
|
||||
ApplyResult(r => r.Type = Tracking ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
|
||||
protected override void UpdateInitialTransforms()
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableSpinnerTick : DrawableOsuHitObject
|
||||
|
@ -18,6 +16,6 @@ public DrawableSpinnerTick(SpinnerTick spinnerTick)
|
|||
/// Apply a judgement result.
|
||||
/// </summary>
|
||||
/// <param name="hit">Whether this tick was reached.</param>
|
||||
internal void TriggerResult(bool hit) => ApplyResult(r => r.Type = hit ? r.Judgement.MaxResult : HitResult.Miss);
|
||||
internal void TriggerResult(bool hit) => ApplyResult(r => r.Type = hit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
|
@ -36,7 +37,7 @@ public void SetBonusCount(int count)
|
|||
return;
|
||||
|
||||
displayedCount = count;
|
||||
bonusCounter.Text = $"{SpinnerBonusTick.SCORE_PER_TICK * count}";
|
||||
bonusCounter.Text = $"{Judgement.LARGE_BONUS_SCORE * count}";
|
||||
bonusCounter.FadeOutFromOne(1500);
|
||||
bonusCounter.ScaleTo(1.5f).Then().ScaleTo(1f, 1000, Easing.OutQuint);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
|
|||
|
||||
public class SliderRepeatJudgement : OsuJudgement
|
||||
{
|
||||
protected override int NumericResultFor(HitResult result) => result == MaxResult ? 30 : 0;
|
||||
public override HitResult MaxResult => HitResult.LargeTickHit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@ public SliderTailCircle(Slider slider)
|
|||
|
||||
public class SliderTailJudgement : OsuJudgement
|
||||
{
|
||||
protected override int NumericResultFor(HitResult result) => 0;
|
||||
|
||||
public override bool AffectsCombo => false;
|
||||
public override HitResult MaxResult => HitResult.IgnoreHit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
|
|||
|
||||
public class SliderTickJudgement : OsuJudgement
|
||||
{
|
||||
protected override int NumericResultFor(HitResult result) => result == MaxResult ? 10 : 0;
|
||||
public override HitResult MaxResult => HitResult.LargeTickHit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||
{
|
||||
public class SpinnerBonusTick : SpinnerTick
|
||||
{
|
||||
public new const int SCORE_PER_TICK = 50;
|
||||
|
||||
public SpinnerBonusTick()
|
||||
{
|
||||
Samples.Add(new HitSampleInfo { Name = "spinnerbonus" });
|
||||
|
@ -20,9 +18,7 @@ public SpinnerBonusTick()
|
|||
|
||||
public class OsuSpinnerBonusTickJudgement : OsuSpinnerTickJudgement
|
||||
{
|
||||
protected override int NumericResultFor(HitResult result) => result == MaxResult ? SCORE_PER_TICK : 0;
|
||||
|
||||
protected override double HealthIncreaseFor(HitResult result) => base.HealthIncreaseFor(result) * 2;
|
||||
public override HitResult MaxResult => HitResult.LargeBonus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,19 +9,13 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||
{
|
||||
public class SpinnerTick : OsuHitObject
|
||||
{
|
||||
public const int SCORE_PER_TICK = 10;
|
||||
|
||||
public override Judgement CreateJudgement() => new OsuSpinnerTickJudgement();
|
||||
|
||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||
|
||||
public class OsuSpinnerTickJudgement : OsuJudgement
|
||||
{
|
||||
public override bool AffectsCombo => false;
|
||||
|
||||
protected override int NumericResultFor(HitResult result) => result == MaxResult ? SCORE_PER_TICK : 0;
|
||||
|
||||
protected override double HealthIncreaseFor(HitResult result) => result == MaxResult ? 0.6 * base.HealthIncreaseFor(result) : 0;
|
||||
public override HitResult MaxResult => HitResult.SmallBonus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue