SoundControlPoint -> SampleControlPoint

This commit is contained in:
Dean Herbert
2017-12-23 16:31:45 +09:00
parent ff0927e71b
commit 5026c7a95e
12 changed files with 27 additions and 27 deletions

View File

@ -86,16 +86,16 @@ namespace osu.Game.Rulesets.Objects.Drawables
{
foreach (SampleInfo sample in HitObject.Samples)
{
if (HitObject.SoundControlPoint == null)
throw new ArgumentNullException(nameof(HitObject.SoundControlPoint), $"{nameof(HitObject)} must always have an attached {nameof(HitObject.SoundControlPoint)}.");
if (HitObject.SampleControlPoint == null)
throw new ArgumentNullException(nameof(HitObject.SampleControlPoint), $"{nameof(HitObject)} must always have an attached {nameof(HitObject.SampleControlPoint)}.");
var bank = sample.Bank;
if (string.IsNullOrEmpty(bank))
bank = HitObject.SoundControlPoint.SampleBank;
bank = HitObject.SampleControlPoint.SampleBank;
int volume = sample.Volume;
if (volume == 0)
volume = HitObject.SoundControlPoint.SampleVolume;
volume = HitObject.SampleControlPoint.SampleVolume;
SampleChannel channel = audio.Sample.Get($@"Gameplay/{bank}-{sample.Name}");

View File

@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Objects
public SampleInfoList Samples = new SampleInfoList();
[JsonIgnore]
public SoundControlPoint SoundControlPoint;
public SampleControlPoint SampleControlPoint;
/// <summary>
/// Whether this <see cref="HitObject"/> is in Kiai time.
@ -64,11 +64,11 @@ namespace osu.Game.Rulesets.Objects
protected virtual void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
SoundControlPoint soundPoint = controlPointInfo.SoundPointAt(StartTime);
SampleControlPoint samplePoint = controlPointInfo.SamplePointAt(StartTime);
EffectControlPoint effectPoint = controlPointInfo.EffectPointAt(StartTime);
Kiai = effectPoint.KiaiMode;
SoundControlPoint = soundPoint;
SampleControlPoint = samplePoint;
}
protected virtual void CreateNestedHitObjects()