mirror of
https://github.com/ppy/osu
synced 2025-01-08 23:29:43 +00:00
Add ability to change distribution of test HitEvent
s
This commit is contained in:
parent
4117a6adf7
commit
5e47e35f0d
@ -71,16 +71,16 @@ namespace osu.Game.Tests.Visual.Ranking
|
||||
};
|
||||
});
|
||||
|
||||
public static List<HitEvent> CreateDistributedHitEvents()
|
||||
public static List<HitEvent> CreateDistributedHitEvents(double centre = 0, double range = 25)
|
||||
{
|
||||
var hitEvents = new List<HitEvent>();
|
||||
|
||||
for (int i = 0; i < 50; i++)
|
||||
for (int i = 0; i < range * 2; i++)
|
||||
{
|
||||
int count = (int)(Math.Pow(25 - Math.Abs(i - 25), 2));
|
||||
int count = (int)(Math.Pow(range - Math.Abs(i - range), 2));
|
||||
|
||||
for (int j = 0; j < count; j++)
|
||||
hitEvents.Add(new HitEvent(i - 25, HitResult.Perfect, new HitCircle(), new HitCircle(), null));
|
||||
hitEvents.Add(new HitEvent(centre + i - range, HitResult.Perfect, new HitCircle(), new HitCircle(), null));
|
||||
}
|
||||
|
||||
return hitEvents;
|
||||
|
Loading…
Reference in New Issue
Block a user