mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add ability to lookup mod from a type specification
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Engines;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
|
||||
namespace osu.Game.Benchmarks
|
||||
@ -45,5 +46,17 @@ namespace osu.Game.Benchmarks
|
||||
{
|
||||
ruleset.GetAllModsForReference().Consume(new Consumer());
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void BenchmarkGetForAcronym()
|
||||
{
|
||||
ruleset.GetModForAcronym("DT");
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void BenchmarkGetForType()
|
||||
{
|
||||
ruleset.GetMod<ModDoubleTime>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user