public int NextFrame() { if (!EndOfSequence) { currentFrame++; if (currentFrame >= Frames.Count) { currentFrame = 0; } totalFrame++; } return Frames[currentFrame]; }