step++;
}
@Override
public void render(GL2 gl) {
GLObj obj = Deer.obj;
if (step - lastHurt < 10){
obj = Deer.objHurt;
}
if (obj.buffer == null){
obj.initBuffer(gl);
}
gl.glPushMatrix();
gl.glTranslated((float)x+xlen/2, (float)y+ylen/2, (float)z);
gl.glScaled(.5, .5, .5);
gl.glRotated(this.dir*180/Math.PI, 0, 0, 1);
gl.glRotated(90, 1, 0, 0);
obj.render(gl);
gl.glPopMatrix();
}