Re-implement the SampleBank/Sample structure. No parsing support yet.

This commit is contained in:
smoogipooo
2017-04-05 21:34:28 +09:00
parent 1d4a371ded
commit 2d8239a3f7
18 changed files with 126 additions and 138 deletions

View File

@ -67,7 +67,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
ComboIndex = s.ComboIndex,
Scale = s.Scale,
ComboColour = s.ComboColour,
Sample = s.Sample,
SampleBank = s.SampleBank,
}),
};
@ -111,7 +111,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
if (repeat > currentRepeat)
{
if (repeat < slider.RepeatCount && ball.Tracking)
PlaySample();
PlaySamples();
currentRepeat = repeat;
}

View File

@ -58,12 +58,10 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
string sampleSet = (HitObject.Sample?.Set ?? SampleSet.Normal).ToString().ToLower();
sample = audio.Sample.Get($@"Gameplay/{sampleSet}-slidertick");
sample = audio.Sample.Get($@"Gameplay/{HitObject.SampleBank.Name.ToLower()}-slidertick");
}
protected override void PlaySample()
protected override void PlaySamples()
{
sample?.Play();
}

View File

@ -95,11 +95,7 @@ namespace osu.Game.Modes.Osu.Objects
StackHeight = StackHeight,
Scale = Scale,
ComboColour = ComboColour,
Sample = new HitSampleInfo
{
Type = SampleType.None,
Set = SampleSet.Soft,
},
SampleBank = SampleBank
};
}
}