mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Use new hit results in taiko
This commit is contained in:
@ -129,7 +129,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
if (countHit >= HitObject.RequiredGoodHits)
|
||||
{
|
||||
ApplyResult(r => r.Type = countHit >= HitObject.RequiredGreatHits ? HitResult.Great : HitResult.Good);
|
||||
ApplyResult(r => r.Type = countHit >= HitObject.RequiredGreatHits ? HitResult.Great : HitResult.Ok);
|
||||
}
|
||||
else
|
||||
ApplyResult(r => r.Type = HitResult.Miss);
|
||||
@ -174,7 +174,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
if (!MainObject.Judged)
|
||||
return;
|
||||
|
||||
ApplyResult(r => r.Type = MainObject.IsHit ? HitResult.Great : HitResult.Miss);
|
||||
ApplyResult(r => r.Type = MainObject.IsHit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
|
||||
public override bool OnPressed(TaikoAction action) => false;
|
||||
|
@ -4,7 +4,6 @@
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
@ -34,14 +33,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
if (!userTriggered)
|
||||
{
|
||||
if (timeOffset > HitObject.HitWindow)
|
||||
ApplyResult(r => r.Type = HitResult.Miss);
|
||||
ApplyResult(r => r.Type = r.Judgement.MinResult);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Math.Abs(timeOffset) > HitObject.HitWindow)
|
||||
return;
|
||||
|
||||
ApplyResult(r => r.Type = HitResult.Great);
|
||||
ApplyResult(r => r.Type = r.Judgement.MaxResult);
|
||||
}
|
||||
|
||||
protected override void UpdateStateTransforms(ArmedState state)
|
||||
@ -74,7 +73,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
if (!MainObject.Judged)
|
||||
return;
|
||||
|
||||
ApplyResult(r => r.Type = MainObject.IsHit ? HitResult.Great : HitResult.Miss);
|
||||
ApplyResult(r => r.Type = MainObject.IsHit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
|
||||
public override bool OnPressed(TaikoAction action) => false;
|
||||
|
@ -257,19 +257,19 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
if (!MainObject.Result.IsHit)
|
||||
{
|
||||
ApplyResult(r => r.Type = HitResult.Miss);
|
||||
ApplyResult(r => r.Type = r.Judgement.MinResult);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!userTriggered)
|
||||
{
|
||||
if (timeOffset - MainObject.Result.TimeOffset > second_hit_window)
|
||||
ApplyResult(r => r.Type = HitResult.Miss);
|
||||
ApplyResult(r => r.Type = r.Judgement.MinResult);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Math.Abs(timeOffset - MainObject.Result.TimeOffset) <= second_hit_window)
|
||||
ApplyResult(r => r.Type = MainObject.Result.Type);
|
||||
ApplyResult(r => r.Type = r.Judgement.MaxResult);
|
||||
}
|
||||
|
||||
public override bool OnPressed(TaikoAction action)
|
||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
nextTick?.TriggerResult(HitResult.Great);
|
||||
nextTick?.TriggerResult(true);
|
||||
|
||||
var numHits = ticks.Count(r => r.IsHit);
|
||||
|
||||
@ -208,10 +208,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
continue;
|
||||
}
|
||||
|
||||
tick.TriggerResult(HitResult.Miss);
|
||||
tick.TriggerResult(false);
|
||||
}
|
||||
|
||||
var hitResult = numHits > HitObject.RequiredHits / 2 ? HitResult.Good : HitResult.Miss;
|
||||
var hitResult = numHits > HitObject.RequiredHits / 2 ? HitResult.Ok : HitResult.Miss;
|
||||
|
||||
ApplyResult(r => r.Type = hitResult);
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
@ -19,10 +18,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
protected override void UpdateInitialTransforms() => this.FadeOut();
|
||||
|
||||
public void TriggerResult(HitResult type)
|
||||
public void TriggerResult(bool hit)
|
||||
{
|
||||
HitObject.StartTime = Time.Current;
|
||||
ApplyResult(r => r.Type = type);
|
||||
ApplyResult(r => r.Type = hit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
||||
}
|
||||
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
|
Reference in New Issue
Block a user