mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:52:56 +08:00
Move common HitSampleInfo lookup to static method
This commit is contained in:
parent
98c6027352
commit
b8e9f19b92
@ -17,6 +17,11 @@ namespace osu.Game.Audio
|
||||
public const string HIT_NORMAL = @"hitnormal";
|
||||
public const string HIT_CLAP = @"hitclap";
|
||||
|
||||
/// <summary>
|
||||
/// All valid sample addition constants.
|
||||
/// </summary>
|
||||
public static IEnumerable<string> AllAdditions => new[] { HIT_WHISTLE, HIT_CLAP, HIT_FINISH };
|
||||
|
||||
/// <summary>
|
||||
/// The bank to load the sample from.
|
||||
/// </summary>
|
||||
|
@ -331,10 +331,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// </summary>
|
||||
private void createStateBindables()
|
||||
{
|
||||
// hit samples
|
||||
var sampleTypes = new[] { HitSampleInfo.HIT_WHISTLE, HitSampleInfo.HIT_CLAP, HitSampleInfo.HIT_FINISH };
|
||||
|
||||
foreach (var sampleName in sampleTypes)
|
||||
foreach (var sampleName in HitSampleInfo.AllAdditions)
|
||||
{
|
||||
var bindable = new Bindable<TernaryState>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user