mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
SoundControlPoint -> SampleControlPoint
This commit is contained in:
@ -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}");
|
||||
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user