@Override public void draw (TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise) { if (!adjustNeeded) { super.draw(region, x, y, originX, originY, width, height, scaleX, scaleY, rotation, clockwise); } else { drawAdjusted(region, x, y, originX, originY, width, height, scaleX, scaleY, rotation, clockwise); } }
@Override public void draw (TextureRegion region, float width, float height, Affine2 transform) { if (!adjustNeeded) { super.draw(region, width, height, transform); } else { drawAdjusted(region, width, height, transform); } }
@Override public void draw (Texture texture, float x, float y, int srcX, int srcY, int srcWidth, int srcHeight) { if (!adjustNeeded) { super.draw(texture, x, y, srcX, srcY, srcWidth, srcHeight); } else { drawAdjusted(texture, x, y, 0, 0, srcWidth, srcHeight, 1, 1, 0, srcX, srcY, srcWidth, srcHeight, false, false); } }
@Override public void draw (Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY) { if (!adjustNeeded) { super.draw(texture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, srcX, srcY, srcWidth, srcHeight, flipX, flipY); } else { drawAdjusted(texture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, srcX, srcY, srcWidth, srcHeight, flipX, flipY); } }
@Override public void draw (Texture texture, float x, float y, float width, float height, float u, float v, float u2, float v2) { if (!adjustNeeded) { super.draw(texture, x, y, width, height, u, v, u2, v2); } else { drawAdjustedUV(texture, x, y, 0, 0, width, height, 1, 1, 0, u, v, u2, v2, false, false); } }
@Override public void draw (Texture texture, float x, float y, float width, float height) { if (!adjustNeeded) { super.draw(texture, x, y, width, height); } else { drawAdjusted(texture, x, y, 0, 0, width, height, 1, 1, 0, 0, 1, 1, 0, false, false); } }
@Override public void draw (Texture texture, float x, float y, float width, float height, float u, float v, float u2, float v2) { if (!adjustNeeded) { super.draw(texture, x, y, width, height, u, v, u2, v2); } else { drawAdjustedUV(texture, x, y, 0, 0, width, height, 1, 1, 0, u, v, u2, v2, false, false); } }
@Override public void draw (TextureRegion region, float x, float y, float width, float height) { if (!adjustNeeded) { super.draw(region, x, y, width, height); } else { drawAdjusted(region, x, y, 0, 0, width, height, 1, 1, 0); } }
@Override public void draw (Texture texture, float x, float y, float width, float height) { if (!adjustNeeded) { super.draw(texture, x, y, width, height); } else { drawAdjusted(texture, x, y, 0, 0, width, height, 1, 1, 0, 0, 1, 1, 0, false, false); } }
@Override public void draw (TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise) { if (!adjustNeeded) { super.draw(region, x, y, originX, originY, width, height, scaleX, scaleY, rotation, clockwise); } else { drawAdjusted(region, x, y, originX, originY, width, height, scaleX, scaleY, rotation, clockwise); } }
@Override public void draw (TextureRegion region, float width, float height, Affine2 transform) { if (!adjustNeeded) { super.draw(region, width, height, transform); } else { drawAdjusted(region, width, height, transform); } }
@Override public void draw (Texture texture, float[] spriteVertices, int offset, int count) { if (count % Sprite.SPRITE_SIZE != 0) throw new GdxRuntimeException("invalid vertex count"); if (!adjustNeeded) { super.draw(texture, spriteVertices, offset, count); } else { drawAdjusted(texture, spriteVertices, offset, count); } }
@Override public void draw (Texture texture, float[] spriteVertices, int offset, int count) { if (count % Sprite.SPRITE_SIZE != 0) throw new GdxRuntimeException("invalid vertex count"); if (!adjustNeeded) { super.draw(texture, spriteVertices, offset, count); } else { drawAdjusted(texture, spriteVertices, offset, count); } }
@Override public void draw (TextureRegion region, float x, float y) { if (!adjustNeeded) { super.draw(region, x, y); } else { drawAdjusted(region, x, y, 0, 0, region.getRegionWidth(), region.getRegionHeight(), 1, 1, 0); } }
@Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); batch.begin(); if(texture != null) batch.draw(texture, 0, 0); batch.end(); } }
public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); spriteBatch.draw(texture, 100, 100); spriteBatch.end(); }
@Override public void draw (Texture texture, float x, float y) { if (!adjustNeeded) { super.draw(texture, x, y); } else { drawAdjusted(texture, x, y, 0, 0, texture.getWidth(), texture.getHeight(), 1, 1, 0, 0, 1, 1, 0, false, false); } }
@Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); batch.begin(); batch.draw(texture, 0, 0); batch.end(); }
@Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); batch.begin(); batch.draw(result, 0, 0); batch.end(); } }
@Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); currentFrameTime += Gdx.graphics.getDeltaTime(); spriteBatch.begin(); TextureRegion frame = currentWalk.getKeyFrame(currentFrameTime, true); spriteBatch.draw(frame, position.x, position.y); spriteBatch.end(); }