Fixed comment. Created static CatchArea.GetCatcheWidth method

This commit is contained in:
Hanamuke 2018-09-13 17:01:33 +02:00
parent 623f8bfaf5
commit 7d3380db66
3 changed files with 9 additions and 7 deletions

View File

@ -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;

View File

@ -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; }

View File

@ -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>