public void update(float deltaTime) { ai.update(deltaTime); if (Settings.engineExhaust && exhaust != null) { for (EngineExhaust ex : exhaust) { ex.update(); } } }
@Override public void render() { alite.getTextureManager().setTexture(textureFilename); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, numberOfVertices); alite.getTextureManager().setTexture(null); if (Settings.engineExhaust && exhaust != null && !exhaust.isEmpty() && getSpeed() < 0f) { for (EngineExhaust ex : exhaust) { ex.render(); } } }