mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Back to using SampleInfo + fix taiko beatmap conversion.
This commit is contained in:
@ -67,7 +67,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
ComboIndex = s.ComboIndex,
|
||||
Scale = s.Scale,
|
||||
ComboColour = s.ComboColour,
|
||||
SampleBanks = s.SampleBanks,
|
||||
Samples = s.Samples,
|
||||
}),
|
||||
};
|
||||
|
||||
|
@ -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)
|
||||
|
@ -2,13 +2,14 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Database;
|
||||
using System.Linq;
|
||||
using osu.Game.Audio;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
{
|
||||
@ -95,7 +96,12 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
StackHeight = StackHeight,
|
||||
Scale = Scale,
|
||||
ComboColour = ComboColour,
|
||||
SampleBanks = SampleBanks
|
||||
Samples = Samples.Select(s => new SampleInfo
|
||||
{
|
||||
Bank = s.Bank,
|
||||
Name = @"slidertick",
|
||||
Volume = s.Volume
|
||||
}).ToList()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user