private void NextFrame() { currentFrame = (currentFrame + 1) % anim.frameCount; int nextFrame = anim.startFrame + currentFrame; if (anim.use8Dir) { nextFrame += anim.frameCount * (int)face.GetFace(); } render.sprite = frames[nextFrame]; }
private void NextFrame() { currentFrame = (currentFrame + 1) % anim.frameCount; int nextFrame = anim.startFrame + currentFrame; if (anim.use8Dir) { nextFrame += anim.frameCount * (int)face.GetFace(); } render.sprite = frames[nextFrame]; }