@Override public void render() { super.render(); if (move == LEFT) kirbyLeft.bind(); else if (move == TOP) kirbyBack.bind(); else kirbyRight.bind(); glBegin(GL_QUADS); glTexCoord2f(((float) (i + 1) / 10), 1); glVertex3f(x - 1, 0, y); glTexCoord2f(((float) (i) / 10), 1); glVertex3f(x + 1, 0, y); glTexCoord2f(((float) (i) / 10), 0); glVertex3f(x + 1, 2, y); glTexCoord2f(((float) (i + 1) / 10), 0); glVertex3f(x - 1, 2, y); glEnd(); Texture.unbind(); t++; if (t >= 20) { if (i < 10) i++; else i = 0; t = 0; } }