Files
Ez2Lazer/osu.Game.Rulesets.Mania/Objects/EzCurrentHitObject/Ez2AcDrawableNote.cs
LA ceeb248de8 同步
放宽Ez2Ac面尾逻辑
2026-01-22 20:35:12 +08:00

76 lines
2.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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 System;
using System.ComponentModel;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.Scoring;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Objects.EzCurrentHitObject
{
public partial class Ez2AcDrawableLNTail : DrawableHoldNoteTail
{
public override bool DisplayResult => false;
protected override void CheckForResult(bool userTriggered, double timeOffset)
{
if (!HoldNote.Head.IsHit)
{
return;
}
if ((timeOffset >= 0 && HoldNote.IsHolding.Value) || (timeOffset <= 20 && HoldNote.Tail.IsHit))
{
ApplyMaxResult();
}
else if (timeOffset > 0)
{
ApplyMinResult();
}
}
protected override HitResult GetCappedResult(HitResult result)
{
bool hasComboBreak = !HoldNote.Head.IsHit || HoldNote.Body.HasHoldBreak;
if (result > HitResult.Miss && hasComboBreak)
return HitResult.ComboBreak;
return result;
}
public override bool OnPressed(KeyBindingPressEvent<ManiaAction> e) => false; // Handled by the hold note
public override void OnReleased(KeyBindingReleaseEvent<ManiaAction> e)
{
}
}
public partial class Ez2AcDrawableNote : DrawableNote
{
protected override void CheckForResult(bool userTriggered, double timeOffset)
{
// if (userTriggered && HitObject.HitWindows is ManiaHitWindows ezWindows)
// {
// double missWindow = double.Abs(ezWindows.WindowFor(HitResult.Miss));
// double poolEarlyWindow = missWindow + 500;
// double poolLateWindow = missWindow + 150;
//
// // 提前按下timeOffset < 0且在提前 Pool 窗口内
// if ((timeOffset < 0 && missWindow <= poolEarlyWindow) ||
// (timeOffset > 0 && timeOffset <= poolLateWindow))
// ApplyResult(HitResult.Pool);
// }
if (userTriggered && (timeOffset < -500 || timeOffset > 200))
{
ApplyResult(HitResult.Pool);
}
base.CheckForResult(userTriggered, timeOffset);
}
}
}