mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:52:55 +08:00
Add class constraint
This commit is contained in:
parent
fe8c462498
commit
e8ab3cff3c
@ -11,6 +11,6 @@ namespace osu.Game.Rulesets.Mods
|
||||
/// </summary>
|
||||
public interface IApplicableToTrack : IApplicableMod
|
||||
{
|
||||
void ApplyToTrack<T>(T track) where T : ITrack, IAdjustableAudioComponent;
|
||||
void ApplyToTrack<T>(T track) where T : class, ITrack, IAdjustableAudioComponent;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,8 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
public abstract BindableNumber<double> SpeedChange { get; }
|
||||
|
||||
public virtual void ApplyToTrack<T>(T track) where T : ITrack, IAdjustableAudioComponent
|
||||
public virtual void ApplyToTrack<T>(T track)
|
||||
where T : class, ITrack, IAdjustableAudioComponent
|
||||
{
|
||||
track.AddAdjustment(AdjustableProperty.Tempo, SpeedChange);
|
||||
}
|
||||
|
@ -51,7 +51,8 @@ namespace osu.Game.Rulesets.Mods
|
||||
AdjustPitch.BindValueChanged(applyPitchAdjustment);
|
||||
}
|
||||
|
||||
public void ApplyToTrack<T>(T track) where T : ITrack, IAdjustableAudioComponent
|
||||
public void ApplyToTrack<T>(T track)
|
||||
where T : class, ITrack, IAdjustableAudioComponent
|
||||
{
|
||||
this.track = track;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user