2019-01-24 08:43:03 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2018-11-20 07:51:59 +00:00
|
|
|
|
using osuTK;
|
2017-09-07 21:55:05 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Storyboards.Drawables;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-07 21:55:05 +00:00
|
|
|
|
namespace osu.Game.Storyboards
|
|
|
|
|
{
|
2017-09-13 09:22:24 +00:00
|
|
|
|
public class StoryboardAnimation : StoryboardSprite
|
2017-09-07 21:55:05 +00:00
|
|
|
|
{
|
|
|
|
|
public int FrameCount;
|
|
|
|
|
public double FrameDelay;
|
|
|
|
|
public AnimationLoopType LoopType;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-13 09:22:24 +00:00
|
|
|
|
public StoryboardAnimation(string path, Anchor origin, Vector2 initialPosition, int frameCount, double frameDelay, AnimationLoopType loopType)
|
2017-09-07 21:55:05 +00:00
|
|
|
|
: base(path, origin, initialPosition)
|
|
|
|
|
{
|
|
|
|
|
FrameCount = frameCount;
|
|
|
|
|
FrameDelay = frameDelay;
|
|
|
|
|
LoopType = loopType;
|
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-07 21:55:05 +00:00
|
|
|
|
public override Drawable CreateDrawable()
|
2017-09-13 09:22:24 +00:00
|
|
|
|
=> new DrawableStoryboardAnimation(this);
|
2017-09-07 21:55:05 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-07 21:55:05 +00:00
|
|
|
|
public enum AnimationLoopType
|
|
|
|
|
{
|
|
|
|
|
LoopForever,
|
|
|
|
|
LoopOnce,
|
|
|
|
|
}
|
|
|
|
|
}
|