private void OnIteration(object o, EventArgs args)
{
if (!Visible) {
return;
}
if (frames == null || frames.Length == 0) {
return;
} else if (frames.Length == 1) {
base.Pixbuf = frames[0];
return;
}
// The first frame is the idle frame, so skip it when animating
int index = (int)Math.Round ((double)(frames.Length - 2) * stage.Actor.Percent) + 1;
if (base.Pixbuf != frames[index]) {
base.Pixbuf = frames[index];
}
}