Fix hit type not being provided and hit time offset not being considered

This commit is contained in:
Dean Herbert 2020-04-27 16:48:17 +09:00
parent b9f28c8373
commit 52cf1e1859
3 changed files with 14 additions and 14 deletions

View File

@ -11,16 +11,21 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
/// </summary>
public class DrawableFlyingHit : DrawableHit
{
public DrawableFlyingHit(DrawableDrumRollTick drumRollTick)
: base(new IgnoreHit
{
StartTime = drumRollTick.HitObject.StartTime + drumRollTick.Result.TimeOffset,
IsStrong = drumRollTick.HitObject.IsStrong,
Type = drumRollTick.JudgementType
})
{
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
}
protected override void LoadComplete()
{
base.LoadComplete();
ApplyResult(r => r.Type = r.Judgement.MaxResult);
}
public DrawableFlyingHit(double time, bool isStrong = false)
: base(new IgnoreHit { StartTime = time, IsStrong = isStrong })
{
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
}
}
}

View File

@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Taiko.UI
for (var i = AliveInternalChildren.Count - 1; i >= 0; i--)
{
var flyingHit = (DrawableFlyingHit)AliveInternalChildren[i];
if (Time.Current < flyingHit.HitObject.StartTime)
if (Time.Current <= flyingHit.HitObject.StartTime)
Remove(flyingHit);
}
}

View File

@ -9,7 +9,6 @@ using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Rulesets.Taiko.Objects.Drawables;
@ -206,12 +205,8 @@ namespace osu.Game.Rulesets.Taiko.UI
}
}
private void addDrumRollHit(DrawableDrumRollTick drawableTick)
{
bool isStrong = drawableTick.HitObject.IsStrong;
double time = drawableTick.HitObject.GetEndTime();
drumRollHitContainer.Add(new DrawableFlyingHit(time, isStrong));
}
private void addDrumRollHit(DrawableDrumRollTick drawableTick) =>
drumRollHitContainer.Add(new DrawableFlyingHit(drawableTick));
private void addExplosion(DrawableHitObject drawableObject, HitType type)
{