mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Ability to contain multiple sample banks. Get default bank name from control point.
This commit is contained in:
@ -12,6 +12,7 @@ using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
@ -28,6 +29,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.SliderTick };
|
||||
|
||||
private List<SampleChannel> samples = new List<SampleChannel>();
|
||||
|
||||
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
|
||||
{
|
||||
this.sliderTick = sliderTick;
|
||||
@ -53,20 +56,18 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
};
|
||||
}
|
||||
|
||||
private SampleChannel sample;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
sample = audio.Sample.Get($@"Gameplay/{HitObject.SampleBank.Name}-slidertick");
|
||||
foreach (var bank in HitObject.SampleBanks)
|
||||
samples.Add(audio.Sample.Get($@"Gameplay/{bank.Name}-slidertick"));
|
||||
}
|
||||
|
||||
protected override void PlaySamples()
|
||||
{
|
||||
sample?.Play();
|
||||
samples.ForEach(s => s?.Play());
|
||||
}
|
||||
|
||||
|
||||
protected override void CheckJudgement(bool userTriggered)
|
||||
{
|
||||
if (Judgement.TimeOffset >= 0)
|
||||
|
Reference in New Issue
Block a user