mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Fixed comment. Created static CatchArea.GetCatcheWidth method
This commit is contained in:
parent
623f8bfaf5
commit
7d3380db66
@ -74,9 +74,6 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
|
||||
private void initialiseHyperDash(List<CatchHitObject> objects)
|
||||
{
|
||||
if (objects.Count == 0)
|
||||
return;
|
||||
|
||||
List<CatchHitObject> objectWithDroplets = new List<CatchHitObject>();
|
||||
|
||||
foreach (var currentObject in objects)
|
||||
@ -89,7 +86,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
objectWithDroplets.Add((CatchHitObject)currentJuiceElement);
|
||||
}
|
||||
|
||||
double halfCatcherWidth = CatcherArea.CATCHER_SIZE * objectWithDroplets[0].Scale / CatchPlayfield.BASE_WIDTH / 2;
|
||||
double halfCatcherWidth = CatcherArea.GetCatcherSize(Beatmap.BeatmapInfo.BaseDifficulty) / 2;
|
||||
int lastDirection = 0;
|
||||
double lastExcess = halfCatcherWidth;
|
||||
|
||||
|
@ -27,9 +27,9 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
public int ComboIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The difference between the distance of the next object
|
||||
/// and the distance that would have triggered hyper dashing.
|
||||
/// A value close to 0 indicates a difficult jump (for SR calculation)
|
||||
/// Difference between the distance to the next object
|
||||
/// and the distance that would have triggered a hyper dash.
|
||||
/// A value close to 0 indicates a difficult jump (for difficulty calculation).
|
||||
/// </summary>
|
||||
public float DistanceToHyperDash { get; set; }
|
||||
|
||||
|
@ -107,6 +107,11 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
public bool AttemptCatch(CatchHitObject obj) => MovableCatcher.AttemptCatch(obj);
|
||||
|
||||
public static float GetCatcherSize(BeatmapDifficulty difficulty)
|
||||
{
|
||||
return (CATCHER_SIZE / CatchPlayfield.BASE_WIDTH) * (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5);
|
||||
}
|
||||
|
||||
public class Catcher : Container, IKeyBindingHandler<CatchAction>
|
||||
{
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user