1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 00:42:55 +08:00

Add frameLength parameter to GetAnimation

This commit is contained in:
smoogipoo 2020-04-02 22:55:42 +09:00
parent 23b53bee56
commit 2a6c0de225

View File

@ -15,7 +15,7 @@ namespace osu.Game.Skinning
public static class LegacySkinExtensions
{
public static Drawable GetAnimation(this ISkin source, string componentName, bool animatable, bool looping, bool applyConfigFrameRate = false, string animationSeparator = "-",
bool startAtCurrentTime = false)
bool startAtCurrentTime = false, double? frameLength = null)
{
Texture texture;
@ -27,7 +27,7 @@ namespace osu.Game.Skinning
{
var animation = new SkinnableTextureAnimation(startAtCurrentTime)
{
DefaultFrameLength = getFrameLength(source, applyConfigFrameRate, textures),
DefaultFrameLength = frameLength ?? getFrameLength(source, applyConfigFrameRate, textures),
Repeat = looping,
};