mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 20:47:22 +08:00
Fix paths for storyboard animation sprites
This commit is contained in:
parent
ef1036cef1
commit
6446074976
@ -118,8 +118,24 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
for (int frame = 0; frame < Animation.FrameCount; frame++)
|
for (int frame = 0; frame < Animation.FrameCount; frame++)
|
||||||
{
|
{
|
||||||
string framePath = Animation.Path.Replace(".", frame + ".");
|
string framePath = Animation.Path.Replace(".", frame + ".");
|
||||||
|
Drawable sprite = storyboard.CreateSpriteFromResourcePath(framePath, textureStore);
|
||||||
|
|
||||||
AddFrame(storyboard.CreateSpriteFromResourcePath(framePath, textureStore), Animation.FrameDelay);
|
if (sprite != null)
|
||||||
|
{
|
||||||
|
AddFrame(sprite, Animation.FrameDelay);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
framePath = Animation.Path.Replace("0.", frame + ".");
|
||||||
|
sprite = storyboard.CreateSpriteFromResourcePath(framePath, textureStore);
|
||||||
|
|
||||||
|
if (sprite != null)
|
||||||
|
{
|
||||||
|
AddFrame(sprite, Animation.FrameDelay);
|
||||||
|
}
|
||||||
|
|
||||||
|
// todo: handle animation intentionally declared with more frames than sprites to cause a blinking effect
|
||||||
|
// e.g. beatmap 5381's "spr\play-skip.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
Animation.ApplyTransforms(this);
|
Animation.ApplyTransforms(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user