1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00
osu-lazer/osu.Game/Storyboards/StoryboardAnimation.cs
2017-09-13 11:22:24 +02:00

34 lines
1001 B
C#

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// 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
{
public class StoryboardAnimation : StoryboardSprite
{
public int FrameCount;
public double FrameDelay;
public AnimationLoopType LoopType;
public StoryboardAnimation(string path, Anchor origin, Vector2 initialPosition, int frameCount, double frameDelay, AnimationLoopType loopType)
: base(path, origin, initialPosition)
{
FrameCount = frameCount;
FrameDelay = frameDelay;
LoopType = loopType;
}
public override Drawable CreateDrawable()
=> new DrawableStoryboardAnimation(this);
}
public enum AnimationLoopType
{
LoopForever,
LoopOnce,
}
}