Back to using SampleInfo + fix taiko beatmap conversion.

This commit is contained in:
smoogipooo
2017-04-06 11:41:16 +09:00
parent e903241c7b
commit eb82a4c090
19 changed files with 178 additions and 164 deletions

View File

@ -2,17 +2,12 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps.Samples;
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
{
@ -29,8 +24,6 @@ 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;
@ -56,18 +49,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
};
}
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
foreach (var bank in HitObject.SampleBanks)
samples.Add(audio.Sample.Get($@"Gameplay/{bank.Name}-slidertick"));
}
protected override void PlaySamples()
{
samples.ForEach(s => s?.Play());
}
protected override void CheckJudgement(bool userTriggered)
{
if (Judgement.TimeOffset >= 0)