mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Make InputDrum handle all Normals/Claps, hitobjects all others
This commit is contained in:
@ -72,6 +72,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
public IReadOnlyList<Judgement> Judgements => judgements;
|
||||
|
||||
protected List<SampleChannel> Samples = new List<SampleChannel>();
|
||||
protected virtual IEnumerable<SampleInfo> GetSamples() => HitObject.Samples;
|
||||
|
||||
public readonly Bindable<ArmedState> State = new Bindable<ArmedState>();
|
||||
|
||||
@ -84,13 +85,14 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
if (Samples.Count > 0)
|
||||
var samples = GetSamples();
|
||||
if (samples.Any())
|
||||
{
|
||||
if (HitObject.SampleControlPoint == null)
|
||||
throw new ArgumentNullException(nameof(HitObject.SampleControlPoint), $"{nameof(HitObject)}s must always have an attached {nameof(HitObject.SampleControlPoint)}."
|
||||
+ $" This is an indication that {nameof(HitObject.ApplyDefaults)} has not been invoked on {this}.");
|
||||
|
||||
foreach (SampleInfo s in HitObject.Samples)
|
||||
foreach (SampleInfo s in samples)
|
||||
{
|
||||
SampleInfo localSampleInfo = new SampleInfo
|
||||
{
|
||||
|
Reference in New Issue
Block a user