@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
public void draw (Batch batch, float x, float y, float width, float height) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setRotation(0); sprite.setScale(1, 1); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }
public void draw (Batch batch, float x, float y, float width, float height) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setRotation(0); sprite.setScale(1, 1); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }
public void draw (Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setOrigin(originX, originY); sprite.setRotation(rotation); sprite.setScale(scaleX, scaleY); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }
public void draw (Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setOrigin(originX, originY); sprite.setRotation(rotation); sprite.setScale(scaleX, scaleY); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }
private void prepareVertices (Batch batch, float x, float y, float width, float height) { final float centerColumnX = x + leftWidth; final float rightColumnX = x + width - rightWidth; final float middleRowY = y + bottomHeight; final float topRowY = y + height - topHeight; final float c = tmpDrawColor.set(color).mul(batch.getColor()).toFloatBits(); if (bottomLeft != -1) set(bottomLeft, x, y, centerColumnX - x, middleRowY - y, c); if (bottomCenter != -1) set(bottomCenter, centerColumnX, y, rightColumnX - centerColumnX, middleRowY - y, c); if (bottomRight != -1) set(bottomRight, rightColumnX, y, x + width - rightColumnX, middleRowY - y, c); if (middleLeft != -1) set(middleLeft, x, middleRowY, centerColumnX - x, topRowY - middleRowY, c); if (middleCenter != -1) set(middleCenter, centerColumnX, middleRowY, rightColumnX - centerColumnX, topRowY - middleRowY, c); if (middleRight != -1) set(middleRight, rightColumnX, middleRowY, x + width - rightColumnX, topRowY - middleRowY, c); if (topLeft != -1) set(topLeft, x, topRowY, centerColumnX - x, y + height - topRowY, c); if (topCenter != -1) set(topCenter, centerColumnX, topRowY, rightColumnX - centerColumnX, y + height - topRowY, c); if (topRight != -1) set(topRight, rightColumnX, topRowY, x + width - rightColumnX, y + height - topRowY, c); }
private void prepareVertices (Batch batch, float x, float y, float width, float height) { final float centerColumnX = x + leftWidth; final float rightColumnX = x + width - rightWidth; final float middleRowY = y + bottomHeight; final float topRowY = y + height - topHeight; final float c = tmpDrawColor.set(color).mul(batch.getColor()).toFloatBits(); if (bottomLeft != -1) set(bottomLeft, x, y, centerColumnX - x, middleRowY - y, c); if (bottomCenter != -1) set(bottomCenter, centerColumnX, y, rightColumnX - centerColumnX, middleRowY - y, c); if (bottomRight != -1) set(bottomRight, rightColumnX, y, x + width - rightColumnX, middleRowY - y, c); if (middleLeft != -1) set(middleLeft, x, middleRowY, centerColumnX - x, topRowY - middleRowY, c); if (middleCenter != -1) set(middleCenter, centerColumnX, middleRowY, rightColumnX - centerColumnX, topRowY - middleRowY, c); if (middleRight != -1) set(middleRight, rightColumnX, middleRowY, x + width - rightColumnX, topRowY - middleRowY, c); if (topLeft != -1) set(topLeft, x, topRowY, centerColumnX - x, y + height - topRowY, c); if (topCenter != -1) set(topCenter, centerColumnX, topRowY, rightColumnX - centerColumnX, y + height - topRowY, c); if (topRight != -1) set(topRight, rightColumnX, topRowY, x + width - rightColumnX, y + height - topRowY, c); }
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
@Override public void renderImageLayer (TiledMapImageLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g,
@Override public void renderImageLayer (TiledMapImageLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g,
public void draw (Batch batch, float x, float y, float width, float height) { Color batchColor = batch.getColor(); temp.set(batchColor); batch.setColor(batchColor.mul(color));
public void draw (Batch batch, float x, float y, float width, float height) { Color batchColor = batch.getColor(); temp.set(batchColor); batch.setColor(batchColor.mul(color));
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
@Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity());
public void draw (Batch batch, float x, float y, float width, float height) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setRotation(0); sprite.setScale(1, 1); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }
public void draw (Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setOrigin(originX, originY); sprite.setRotation(rotation); sprite.setScale(scaleX, scaleY); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }