mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
Move spinner spin samples to auxiliary specification
This commit is contained in:
parent
90e34d7686
commit
be99202188
@ -121,15 +121,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
base.LoadSamples();
|
base.LoadSamples();
|
||||||
|
|
||||||
var firstSample = HitObject.Samples.FirstOrDefault();
|
spinningSample.Samples = HitObject.CreateSpinningSamples().Select(s => HitObject.SampleControlPoint.ApplyTo(s)).Cast<ISampleInfo>().ToArray();
|
||||||
|
spinningSample.Frequency.Value = spinning_sample_initial_frequency;
|
||||||
if (firstSample != null)
|
|
||||||
{
|
|
||||||
var clone = HitObject.SampleControlPoint.ApplyTo(firstSample).With("spinnerspin");
|
|
||||||
|
|
||||||
spinningSample.Samples = new ISampleInfo[] { clone };
|
|
||||||
spinningSample.Frequency.Value = spinning_sample_initial_frequency;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSpinningSample(ValueChangedEvent<bool> tracking)
|
private void updateSpinningSample(ValueChangedEvent<bool> tracking)
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using osu.Game.Audio;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
@ -73,5 +77,20 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
public override Judgement CreateJudgement() => new OsuJudgement();
|
public override Judgement CreateJudgement() => new OsuJudgement();
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
|
|
||||||
|
public override IList<HitSampleInfo> AuxiliarySamples => CreateSpinningSamples();
|
||||||
|
|
||||||
|
public HitSampleInfo[] CreateSpinningSamples()
|
||||||
|
{
|
||||||
|
var referenceSample = Samples.FirstOrDefault();
|
||||||
|
|
||||||
|
if (referenceSample == null)
|
||||||
|
return Array.Empty<HitSampleInfo>();
|
||||||
|
|
||||||
|
return new[]
|
||||||
|
{
|
||||||
|
SampleControlPoint.ApplyTo(referenceSample).With("spinnerspin")
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user