List of usage examples for com.badlogic.gdx.graphics.g2d Batch setColor
public void setColor(float color);
From source file:actors.Archer.java
@Override public void draw(Batch batch, float parentAlpha) { sprite.setColor(this.getColor()); batch.setColor(this.getColor()); sprite.draw(batch);/* www. j ava 2 s . c o m*/ emptyHealthBar.draw(batch); if (health < 99999) fullHealthBar.draw(batch); }
From source file:actors.Arrow.java
public void draw(Batch batch, float parentAlpha) { sprite.setColor(this.getColor()); batch.setColor(this.getColor()); sprite.draw(batch);//from w w w. j av a 2 s. co m }
From source file:actors.BasicSkel.java
public void draw(Batch batch, float parentAlpha) { fireEffect.update(Gdx.graphics.getDeltaTime()); fireEffect.draw(batch);/* w w w.jav a2s . c om*/ iceEffect.update(Gdx.graphics.getDeltaTime()); iceEffect.draw(batch); poisonEffect.update(Gdx.graphics.getDeltaTime()); poisonEffect.draw(batch); sprite.setColor(this.getColor()); batch.setColor(this.getColor()); sprite.draw(batch); emptyHealthBar.draw(batch); if (health < 99999) fullHealthBar.draw(batch); }
From source file:actors.Castle.java
@Override public void draw(Batch batch, float parentAlpha) { sprite.setColor(this.getColor()); batch.setColor(this.getColor()); sprite.draw(batch);/*from w w w .jav a2s . co m*/ emptyHealthBar.draw(batch); if (health < 99999) fullHealthBar.draw(batch); }
From source file:actors.Footman.java
public void draw(Batch batch, float parentAlpha) { sprite.setColor(this.getColor()); batch.setColor(this.getColor()); sprite.draw(batch);/*from w w w . ja v a2s .co m*/ emptyHealthBar.draw(batch); if (health < 99999) fullHealthBar.draw(batch); }
From source file:broken.shotgun.throwthemoon.actors.Boss.java
License:Open Source License
@Override public void draw(Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); batch.setColor(getColor()); batch.draw(currentFrame, getX(), getY(), getOriginX(), getOriginY(), getWidth(), getHeight(), flipX ? getScaleX() : -getScaleX(), getScaleY(), getRotation()); batch.setColor(Color.WHITE);/* w w w .j a v a 2 s . com*/ }
From source file:broken.shotgun.throwthemoon.actors.Enemy.java
License:Open Source License
@Override public void draw(Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); batch.setColor(getColor()); batch.draw(currentFrame, getX(), getY(), getOriginX(), getOriginY(), getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation()); batch.setColor(Color.WHITE);//from w w w . j a va 2 s .c om }
From source file:broken.shotgun.throwthemoon.actors.MoonChain.java
License:Open Source License
@Override public void draw(Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); batch.setColor(getColor()); batch.draw(texture, getX(), getY(), // x, y getWidth(), // width getHeight(), // height 1, 0, // u, v 0, TILE_COUNT); // u2, v2 batch.setColor(Color.WHITE);/* w w w. j av a2 s . c om*/ }
From source file:broken.shotgun.throwthemoon.actors.Player.java
License:Open Source License
@Override public void draw(Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); batch.setColor(getColor()); batch.draw(currentFrame, getX(), getY(), getOriginX(), getOriginY(), getWidth(), getHeight(), flipX ? -getScaleX() : getScaleX(), getScaleY(), getRotation()); batch.setColor(Color.WHITE);/*from w w w .j ava 2s .c o m*/ }
From source file:CB_UI.GL_UI.Activitys.ImportAnimation.java
License:Open Source License
public void render(Batch batch) { if (drawableBackground != null) { back = drawableBackground;//from w w w .j a v a2 s .c om drawableBackground = null; } if (back != null) { Color c = batch.getColor(); float a = c.a; float r = c.r; float g = c.g; float b = c.b; Color trans = new Color(0, 0.3f, 0, 0.40f); batch.setColor(trans); back.draw(batch, 0, 0, this.getWidth(), this.getHeight()); batch.setColor(new Color(r, g, b, a)); } }