mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 21:52:56 +08:00
Add frameLength parameter to GetAnimation
This commit is contained in:
parent
23b53bee56
commit
2a6c0de225
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user