UnityMol  0.9.6-875
UnityMol viewer / In developement
UVAnimation Class Reference

Public Member Functions

void Reset ()
 
void PlayInReverse ()
 
bool GetNextFrame (ref Vector2 uv)
 
Vector2[] BuildUVAnim (Vector2 start, Vector2 cellSize, int cols, int rows, int totalCells, float fps)
 
void SetAnim (Vector2[] anim)
 
void AppendAnim (Vector2[] anim)
 

Public Attributes

string name
 
int loopCycles = 0
 
bool loopReverse = false
 
float framerate
 

Protected Attributes

Vector2[] frames
 
int curFrame = 0
 
int stepDir = 1
 
int numLoops = 0
 

Detailed Description

Definition at line 86 of file SpriteManager.cs.

Member Function Documentation

void UVAnimation.AppendAnim ( Vector2[]  anim)

Definition at line 206 of file SpriteManager.cs.

References frames.

Vector2 [] UVAnimation.BuildUVAnim ( Vector2  start,
Vector2  cellSize,
int  cols,
int  rows,
int  totalCells,
float  fps 
)

Definition at line 174 of file SpriteManager.cs.

References frames.

bool UVAnimation.GetNextFrame ( ref Vector2  uv)

Definition at line 121 of file SpriteManager.cs.

References curFrame, numLoops, and stepDir.

Referenced by Sprite.StepAnim().

+ Here is the caller graph for this function:

void UVAnimation.PlayInReverse ( )

Definition at line 112 of file SpriteManager.cs.

Referenced by Sprite.PlayAnimInReverse().

+ Here is the caller graph for this function:

void UVAnimation.Reset ( )

Definition at line 103 of file SpriteManager.cs.

Referenced by Sprite.PlayAnim(), and Sprite.PlayAnimInReverse().

+ Here is the caller graph for this function:

void UVAnimation.SetAnim ( Vector2[]  anim)

Definition at line 199 of file SpriteManager.cs.

Member Data Documentation

int UVAnimation.curFrame = 0
protected

Definition at line 91 of file SpriteManager.cs.

Referenced by GetNextFrame().

float UVAnimation.framerate

Definition at line 98 of file SpriteManager.cs.

Referenced by Sprite.PlayAnim(), and Sprite.PlayAnimInReverse().

Vector2 [] UVAnimation.frames
protected

Definition at line 88 of file SpriteManager.cs.

Referenced by AppendAnim(), and BuildUVAnim().

int UVAnimation.loopCycles = 0

Definition at line 96 of file SpriteManager.cs.

bool UVAnimation.loopReverse = false

Definition at line 97 of file SpriteManager.cs.

string UVAnimation.name

Definition at line 95 of file SpriteManager.cs.

int UVAnimation.numLoops = 0
protected

Definition at line 93 of file SpriteManager.cs.

Referenced by GetNextFrame().

int UVAnimation.stepDir = 1
protected

Definition at line 92 of file SpriteManager.cs.

Referenced by GetNextFrame().


The documentation for this class was generated from the following file: