Don't need Drawable type.

This commit is contained in:
smoogipooo
2017-03-31 15:05:14 +09:00
parent 43c306d658
commit a48224bd6d
2 changed files with 4 additions and 6 deletions

View File

@ -22,15 +22,13 @@ namespace osu.Game.Graphics
/// <summary>
/// Tweens the accent colour of a drawable to another colour.
/// </summary>
/// <typeparam name="TDrawable">The type of drawable.</typeparam>
/// <param name="drawable">The drawable to apply the accent colour to.</param>
/// <param name="accentedDrawable">The drawable to apply the accent colour to.</param>
/// <param name="newColour">The new accent colour.</param>
/// <param name="duration">The tween duration.</param>
/// <param name="easing">The tween easing.</param>
public static void FadeAccent<TDrawable>(this TDrawable drawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
where TDrawable : Drawable, IHasAccentColour
public static void FadeAccent(this IHasAccentColour accentedDrawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
{
drawable.TransformTo(drawable.AccentColour, newColour, duration, easing, new TransformAccent());
accentedDrawable.TransformTo(accentedDrawable.AccentColour, newColour, duration, easing, new TransformAccent());
}
}
}