1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 05:22:57 +08:00
osu-lazer/osu.Game/Storyboards/StoryboardAnimation.cs

34 lines
1001 B
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-09-08 05:55:05 +08:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics;
using osu.Game.Storyboards.Drawables;
namespace osu.Game.Storyboards
{
2017-09-13 17:22:24 +08:00
public class StoryboardAnimation : StoryboardSprite
2017-09-08 05:55:05 +08:00
{
public int FrameCount;
public double FrameDelay;
public AnimationLoopType LoopType;
2017-09-13 17:22:24 +08:00
public StoryboardAnimation(string path, Anchor origin, Vector2 initialPosition, int frameCount, double frameDelay, AnimationLoopType loopType)
2017-09-08 05:55:05 +08:00
: base(path, origin, initialPosition)
{
FrameCount = frameCount;
FrameDelay = frameDelay;
LoopType = loopType;
}
public override Drawable CreateDrawable()
2017-09-13 17:22:24 +08:00
=> new DrawableStoryboardAnimation(this);
2017-09-08 05:55:05 +08:00
}
public enum AnimationLoopType
{
LoopForever,
LoopOnce,
}
}