UV Tile

First test of a spritemanager style uv modifier, this can be used to alter the section of a texture displayed or to play animations. It is a wip so it may give odd results, for example the texture needs to be a power of 2.

UV Tiles Param Description

Frame

Frame or tile to display from sprite sheet.

Tile Width

Width of the tiles on the sheet.

Tile Height

Height of the tiles on the sheet.

Off

Adjust uv positions.

Scale

Zoom uv coordinates.

Animate

Play back the sprite sheet.

EndFrame

Limit animation to first n tiles.

Fps

Desired playback speed.

Flip X

Flip uvs in the x direction.

Flip Y

Flip uvs in the y direction.

UVTiles Class

[cc lang=”c#”]public class MegaUVTiles : MegaModifier
{
public int Frame;
public int TileWidth;
public int TileHeight;
public Vector2 off;
public Vector2 scale;
public bool Animate;
public int EndFrame;
public float fps;
public bool flipy;
public bool flipx;
}[/cc]

You must be logged in to post a comment.