mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Re-implement the SampleBank/Sample structure. No parsing support yet.
This commit is contained in:
@ -43,7 +43,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
return new Slider
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
SampleBank = original.SampleBank,
|
||||
CurveObject = curveData,
|
||||
Position = positionData?.Position ?? Vector2.Zero,
|
||||
NewCombo = comboData?.NewCombo ?? false
|
||||
@ -55,7 +55,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
return new Spinner
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
SampleBank = original.SampleBank,
|
||||
Position = new Vector2(512, 384) / 2,
|
||||
EndTime = endTimeData.EndTime
|
||||
};
|
||||
@ -64,7 +64,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
return new HitCircle
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
SampleBank = original.SampleBank,
|
||||
Position = positionData?.Position ?? Vector2.Zero,
|
||||
NewCombo = comboData?.NewCombo ?? false
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user