A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4namespace osu.Framework.Graphics.Animations
5{
6 /// <summary>
7 /// Represents all data necessary to describe a single frame of an <see cref="Animation{T}"/>.
8 /// </summary>
9 /// <typeparam name="T">The type of animation the frame data is for.</typeparam>
10 public struct FrameData<T>
11 {
12 /// <summary>
13 /// The contents to display for the frame.
14 /// </summary>
15 public T Content { get; set; }
16
17 /// <summary>
18 /// The duration to display the frame for.
19 /// </summary>
20 public double Duration { get; set; }
21
22 /// <summary>
23 /// The time at which this frame is displayed in the containing animation.
24 /// </summary>
25 internal double DisplayStartTime { get; set; }
26
27 /// <summary>
28 /// The time at which this frame is no longer displayed.
29 /// </summary>
30 internal double DisplayEndTime => DisplayStartTime + Duration;
31 }
32}