mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:33:21 +08:00
Add convert osu HitWindows
This commit is contained in:
parent
9c65d347ba
commit
c052ee71c1
@ -18,5 +18,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
||||
public float Y => Position.Y;
|
||||
|
||||
public bool NewCombo { get; set; }
|
||||
|
||||
protected override HitWindows CreateHitWindows() => new ConvertOsuHitWindows();
|
||||
}
|
||||
}
|
||||
|
28
osu.Game/Rulesets/Objects/Legacy/Osu/ConvertOsuHitWindows.cs
Normal file
28
osu.Game/Rulesets/Objects/Legacy/Osu/ConvertOsuHitWindows.cs
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
||||
{
|
||||
public class ConvertOsuHitWindows : HitWindows
|
||||
{
|
||||
private static readonly IReadOnlyDictionary<HitResult, (double od0, double od5, double od10)> base_ranges = new Dictionary<HitResult, (double, double, double)>
|
||||
{
|
||||
{ HitResult.Great, (160, 100, 40) },
|
||||
{ HitResult.Good, (280, 200, 120) },
|
||||
{ HitResult.Meh, (400, 300, 200) },
|
||||
{ HitResult.Miss, (400, 400, 400) },
|
||||
};
|
||||
|
||||
public override void SetDifficulty(double difficulty)
|
||||
{
|
||||
Great = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Great]);
|
||||
Good = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Good]);
|
||||
Meh = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Meh]);
|
||||
Miss = BeatmapDifficulty.DifficultyRange(difficulty, base_ranges[HitResult.Miss]);
|
||||
}
|
||||
}
|
||||
}
|
@ -18,5 +18,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
||||
public float Y => Position.Y;
|
||||
|
||||
public bool NewCombo { get; set; }
|
||||
|
||||
protected override HitWindows CreateHitWindows() => new ConvertOsuHitWindows();
|
||||
}
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
||||
public float X => Position.X;
|
||||
|
||||
public float Y => Position.Y;
|
||||
|
||||
protected override HitWindows CreateHitWindows() => new ConvertOsuHitWindows();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user