using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace BansheeEngine
{
/** @addtogroup Rendering
* @{
*/
///
/// Descriptor that describes a simple sprite sheet animation. The parent texture is split into a grid of x , each representing one frame of the animation. Every frame is of
/// equal size. Frames are sequentially evaluated starting from the top-most row, iterating over all columns in a row and
/// then moving to next row, up to frames. Frames in rows/colums past .
/// frames are evaluated every second, allowing you to control animation speed.
///
[StructLayout(LayoutKind.Sequential), SerializeObject]
public partial struct SpriteSheetGridAnimation
{
/// Initializes the struct with default values.
public static SpriteSheetGridAnimation Default()
{
SpriteSheetGridAnimation value = new SpriteSheetGridAnimation();
value.numRows = 1;
value.numColumns = 1;
value.count = 1;
value.fps = 8;
return value;
}
public SpriteSheetGridAnimation(uint numRows, uint numColumns, uint count, uint fps)
{
this.numRows = numRows;
this.numColumns = numColumns;
this.count = count;
this.fps = fps;
}
///
/// Number of rows to divide the parent's texture area. Determines height of the individual frame (depends on parent
/// texture size).
///
public uint numRows;
///
/// Number of columns to divide the parent's texture area. Determines column of the individual frame (depends on parent
/// texture size).
///
public uint numColumns;
///
/// Number of frames in the animation. Must be less or equal than * .
///
public uint count;
/// How many frames to evaluate each second. Determines the animation speed.
public uint fps;
}
/** @} */
}