Example usage for com.badlogic.gdx.graphics.glutils ShapeRenderer getCurrentType

List of usage examples for com.badlogic.gdx.graphics.glutils ShapeRenderer getCurrentType

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.glutils ShapeRenderer getCurrentType.

Prototype

public ShapeType getCurrentType() 

Source Link

Document

Returns the current shape type.

Usage

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 www . j  a  v  a 2 s . 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  ww w.  j a  v a 2s. c  o  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);/*from  w ww.j a v  a2s .  c o m*/
}