List of usage examples for com.badlogic.gdx.graphics.glutils ShapeRenderer set
public void set(ShapeType type)
From source file:broken.shotgun.throwthemoon.actors.Boss.java
License:Open Source License
@Override public void drawDebug(ShapeRenderer shapes) { if (!getDebug()) return;//from w ww . j a va 2 s.c o m shapes.set(ShapeRenderer.ShapeType.Line); shapes.setColor(Color.GRAY); shapes.rect(getX(), getY(), getWidth(), getHeight()); shapes.setColor(Color.GREEN); shapes.rect(collisionArea.x, collisionArea.y, collisionArea.width, collisionArea.height); shapes.setColor(Color.RED); shapes.circle(getX() + getOriginX(), getY() + getOriginY(), 10f); }
From source file:broken.shotgun.throwthemoon.actors.Enemy.java
License:Open Source License
@Override public void drawDebug(ShapeRenderer shapes) { if (!getDebug()) return;/* w w w . j a v a 2 s . com*/ shapes.set(ShapeRenderer.ShapeType.Line); shapes.setColor(Color.GRAY); shapes.rect(getX(), getY(), getWidth(), getHeight()); shapes.setColor(Color.GREEN); shapes.rect(collisionArea.x, collisionArea.y, collisionArea.width, collisionArea.height); }
From source file:broken.shotgun.throwthemoon.actors.MoonChain.java
License:Open Source License
@Override public void drawDebug(ShapeRenderer shapes) { super.drawDebug(shapes); if (!getDebug()) return;//from ww w . java 2 s. c o m shapes.set(ShapeRenderer.ShapeType.Line); shapes.setColor(Color.GREEN); shapes.rect(collisionArea.x, collisionArea.y, collisionArea.width, collisionArea.height); }
From source file:broken.shotgun.throwthemoon.actors.Player.java
License:Open Source License
@Override public void drawDebug(ShapeRenderer shapes) { if (!getDebug()) return;/*from w w w.ja v a2 s .c o m*/ shapes.set(ShapeRenderer.ShapeType.Line); shapes.setColor(Color.GRAY); shapes.rect(getX(), getY(), getWidth(), getHeight()); shapes.setColor(Color.GREEN); shapes.rect(collisionArea.x, collisionArea.y, collisionArea.width, collisionArea.height); shapes.setColor(Color.RED); shapes.rect(attackArea.x, attackArea.y, attackArea.width, attackArea.height); shapes.setColor(Color.RED); shapes.circle(getX() + getOriginX(), getY() + getOriginY(), 10f); }
From source file:com.jmstudios.pointandhit.ShootAnimation.java
License:Open Source License
public void draw(ShapeRenderer shapeRenderer) { if (shooting) { ShapeType previousType = shapeRenderer.getCurrentType(); shapeRenderer.set(ShapeType.Filled); shapeRenderer.setColor(targetManager.currentTheme.bullet); shapeRenderer.circle(currentX, currentY, currentRadius); shapeRenderer.set(previousType); }//from w w w . j a va 2s . co m }
From source file:com.jmstudios.pointandhit.Target.java
License:Open Source License
public void draw(ShapeRenderer shapeRenderer) { ShapeType previousType = shapeRenderer.getCurrentType(); shapeRenderer.set(ShapeType.Filled); if (currentRadius > 0) { shapeRenderer.setColor(targetManager.currentTheme.target); shapeRenderer.circle(centerPosition.x, centerPosition.y, getRadius()); }/*from www .ja v a 2 s . co m*/ if (dying) { shapeRenderer.setColor(targetManager.currentTheme.background); // Background color shapeRenderer.circle(centerPosition.x, centerPosition.y, currentDyingRadius); } shapeRenderer.set(previousType); }
From source file:com.jmstudios.pointandhit.UserPointer.java
License:Open Source License
public void draw(ShapeRenderer shapeRenderer, GameTheme gameTheme) { ShapeType previousType = shapeRenderer.getCurrentType(); shapeRenderer.set(ShapeType.Filled); shapeRenderer.setColor(gameTheme.userPointer); Vector2 centerPosition = getCenterPosition(); shapeRenderer.circle(centerPosition.x, centerPosition.y, radius); shapeRenderer.set(previousType);/* w ww . j a va2s . c o m*/ }
From source file:com.quadbits.gdxhelper.actors.ParticleEffectActor.java
License:Apache License
@Override public void drawDebug(ShapeRenderer shapes) { super.drawDebug(shapes); if (!this.getDebug() || effect == null) return;//w ww . j ava 2s .c o m shapes.set(ShapeRenderer.ShapeType.Line); shapes.setColor(getStage().getDebugColor()); BoundingBox boundingBox = effect.getBoundingBox(); float centerX = boundingBox.getCenterX(); float centerY = boundingBox.getCenterY(); float width = boundingBox.getWidth(); float height = boundingBox.getHeight(); shapes.rect(centerX - width / 2, centerY - height / 2, width, height); }
From source file:logic.creatures.Beak.java
@Override protected void draw(ShapeRenderer s, double relX, double relY) { s.set(ShapeRenderer.ShapeType.Line); // Draw Beak//w w w. j a v a2 s.co m s.setColor((float) (getLength() / Beak.max_length), (float) (1 - getLength() / Beak.max_length), 0, 1); s.line((float) (relX + creature.getX()), (float) (relY + creature.getY()), (float) (relX * (1.5f + getLength() / Beak.max_length) + creature.getX()), (float) (relY * (1.5f + getLength() / Beak.max_length) + creature.getY())); if (attacking) { s.circle((float) (relX * (1.5f + getLength() / Beak.max_length) + creature.getX()), (float) (relY * (1.5f + getLength() / Beak.max_length) + creature.getY()), 0.3f); } }
From source file:net.bplaced.therefactory.voraciousviper.input.gamescreen.JoystickInputProcessor.java
License:Open Source License
@Override public void render(ShapeRenderer shapeRenderer) { super.render(shapeRenderer); shapeRenderer.set(ShapeType.Filled); shapeRenderer.setColor(buttonTransparentColor); shapeRenderer.circle(circleX, circleY, 100); }