Example usage for com.badlogic.gdx.graphics Color BLUE

List of usage examples for com.badlogic.gdx.graphics Color BLUE

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics Color BLUE.

Prototype

Color BLUE

To view the source code for com.badlogic.gdx.graphics Color BLUE.

Click Source Link

Usage

From source file:im.ligas.worms.worm.WormFactory.java

License:Open Source License

public static WormWithAbility getSniperWorm(Vector2 start, int keyLeft, int keyRight, int keyExecute) {
    return new SniperWormImpl(start, Color.BLUE, (byte) 1, keyLeft, keyRight, keyExecute);
}

From source file:maze.maker.Cell.java

public void draw() {
    if (bVisited) {
        shape.begin(ShapeRenderer.ShapeType.Filled);
        shape.setColor(Color.GRAY);
        shape.rect(fDx, fDy, scl, scl);// w  ww .  j a  v a 2s  .  c o  m
        shape.end();
    }
    if (bMazeFinished) {
        if (bStart) {
            shape.begin(ShapeRenderer.ShapeType.Filled);
            shape.setColor(Color.BLUE);
            shape.rect(fDx, fDy, scl, scl);
            shape.end();
        } else if (bTarget) {
            shape.begin(ShapeRenderer.ShapeType.Filled);
            shape.setColor(Color.RED);
            shape.rect(fDx, fDy, scl, scl);
            shape.end();
        } else if (bHighlight) {
            shape.begin(ShapeRenderer.ShapeType.Filled);
            shape.setColor(Color.WHITE);
            shape.rect(fDx, fDy, scl, scl);
            //                shape.triangle(fDx, fDy, fDx, fDy + scl, fDx + scl, fDy + scl / 2);
            //                shape.circle(fDx + scl/2, fDy + scl/2, scl/2);
            shape.end();
        } else if (bChecked) {
            shape.begin(ShapeRenderer.ShapeType.Filled);
            shape.setColor(Color.BROWN);
            shape.rect(fDx, fDy, scl, scl);
            shape.end();
        }
    }
    shape.begin(ShapeRenderer.ShapeType.Line);
    shape.setColor(Color.BLACK);
    if (Sides[0]) {// top
        shape.rectLine(fDx, fDy + scl - fWidth, fDx + scl, fDy + scl + fWidth, fWidth * 2);
    }
    if (Sides[1]) {// bottom
        shape.rectLine(fDx, fDy - fWidth, fDx + scl, fDy + fWidth, fWidth * 2);
        //            shape.line(0, 0, w, h);
    }
    if (Sides[2]) {// left
        shape.rectLine(fDx - fWidth, fDy, fDx + fWidth, fDy + scl, fWidth * 2);
    }
    if (Sides[3]) {// right
        shape.rectLine(fDx + scl - fWidth, fDy, fDx + scl + fWidth, fDy + scl, fWidth * 2);
    }
    shape.end();
}

From source file:mobi.shad.s3lib.gfx.pixmap.filter.Gradient.java

License:Apache License

/**
 * @param pixmap//from   w w  w. j  a  va2 s .  co  m
 */
@Override
public void generate(final Pixmap pixmap) {
    generate(pixmap, Color.RED, Color.YELLOW, Color.BLUE, Color.PINK, 1.0f);
}

From source file:mobi.shad.s3lib.gfx.pixmap.filter.Gradient.java

License:Apache License

/**
 * @param pixmap// www  . j  a  v a2 s.  c o  m
 */
@Override
public void filter(final Pixmap pixmap) {
    generate(pixmap, Color.RED, Color.YELLOW, Color.BLUE, Color.PINK, 1.0f);
}

From source file:mobi.shad.s3lib.gfx.pixmap.filter.Gradient.java

License:Apache License

/**
 * @param pixmap//  www  .jav  a 2 s . co m
 */
@Override
public void random(final Pixmap pixmap) {
    generate(pixmap, Color.RED, Color.YELLOW, Color.BLUE, Color.PINK, 1.0f);
}

From source file:mobi.shad.s3lib.gui.widget.HtmlView.java

License:Apache License

/**
 * @param node/* w w  w  . ja v  a2  s .c o m*/
 * @return
 */
private CssStyle parseCssStyle(final Element node) {
    final CssStyle style = new CssStyle();

    //
    // Color
    //
    String color = node.getAttribute("color", "");
    if (color.equalsIgnoreCase("yellow")) {
        style.color = Color.YELLOW;
    } else if (color.equalsIgnoreCase("red")) {
        style.color = Color.RED;
    } else if (color.equalsIgnoreCase("green")) {
        style.color = Color.GREEN;
    } else if (color.equalsIgnoreCase("cyan")) {
        style.color = Color.CYAN;
    } else if (color.equalsIgnoreCase("blue")) {
        style.color = Color.BLUE;
    } else if (color.equalsIgnoreCase("gray")) {
        style.color = Color.GRAY;
    } else if (color.equalsIgnoreCase("light_gray")) {
        style.color = Color.LIGHT_GRAY;
    } else if (color.equalsIgnoreCase("dark_gray")) {
        style.color = Color.DARK_GRAY;
    } else if (color.equalsIgnoreCase("orange")) {
        style.color = Color.ORANGE;
    } else if (color.equalsIgnoreCase("magenta")) {
        style.color = Color.MAGENTA;
    } else if (color.equalsIgnoreCase("pink")) {
        style.color = Color.PINK;
    }

    //
    // Align
    //
    String align = node.getAttribute("align", "");
    if (align.equalsIgnoreCase("right")) {
        style.align = Align.right;
    } else if (align.equalsIgnoreCase("left")) {
        style.align = Align.left;
    } else if (align.equalsIgnoreCase("center")) {
        style.align = Align.center;
    } else {
        style.align = Align.left;
    }

    //
    // Font
    //
    String font = node.getAttribute("font", "");
    //      if (font.equalsIgnoreCase("sans12")){
    //         style.font="sans12";
    //      } else if (font.equalsIgnoreCase("sans13")){
    //         style.font="sans13";
    //      } else if (font.equalsIgnoreCase("sans14")){
    //         style.font="sans14";
    //      } else if (font.equalsIgnoreCase("sans15")){
    //         style.font="sans15";
    //      } else if (font.equalsIgnoreCase("droid14")){
    //         style.font="droid14";
    //      } else if (font.equalsIgnoreCase("droid15")){
    //         style.font="droid15";
    //      } else if (font.equalsIgnoreCase("droid16")){
    //         style.font="droid16";
    //      } else if (font.equalsIgnoreCase("droid17")){
    //         style.font="droid17";
    //      } else if (font.equalsIgnoreCase("droid18")){
    //         style.font="droid18";
    //      } else if (font.equalsIgnoreCase("droid22")){
    //         style.font="droid22";
    //      } else if (font.equalsIgnoreCase("droid24")){
    //         style.font="droid24";
    //      }

    //
    // CollSpan
    //
    int collSpan = node.getIntAttribute("collspan", 1);
    if (collSpan > 1) {
        style.collSpan = collSpan;
    }

    return style;
}

From source file:name.herve.bastod.BASToD.java

License:Open Source License

private void initGUIResources(int sqs) {
    GUIResources r = GUIResources.getInstance();
    DecimalFormat blender = new DecimalFormat("0000");

    String set = "bricks";
    String view = "top";

    for (int a = 0; a < 360; a++) {
        r.addTexture("tank-red-" + a, new Texture(Gdx.files
                .internal(sqs + "/3d/" + set + "/" + view + "/tank/red/" + blender.format(a + 1) + ".png")));
        r.addTexture("tank-blue-" + a, new Texture(Gdx.files
                .internal(sqs + "/3d/" + set + "/" + view + "/tank/blue/" + blender.format(a + 1) + ".png")));

        r.addTexture("tower-red-" + a, new Texture(Gdx.files
                .internal(sqs + "/3d/" + set + "/" + view + "/tower/red/" + blender.format(a + 1) + ".png")));
        r.addTexture("tower-blue-" + a, new Texture(Gdx.files
                .internal(sqs + "/3d/" + set + "/" + view + "/tower/blue/" + blender.format(a + 1) + ".png")));
    }//from   w w  w.  j a v a  2  s . c o  m

    r.addTexture("tower-red", new Texture(
            Gdx.files.internal(sqs + "/3d/" + set + "/" + view + "/tower/red/" + blender.format(50) + ".png")));
    r.addTexture("tower-blue", new Texture(Gdx.files
            .internal(sqs + "/3d/" + set + "/" + view + "/tower/blue/" + blender.format(50) + ".png")));

    r.addTexture("factory-red", new Texture(Gdx.files
            .internal(sqs + "/3d/" + set + "/" + view + "/factory/red/" + blender.format(0) + ".png")));
    r.addTexture("factory-blue", new Texture(Gdx.files
            .internal(sqs + "/3d/" + set + "/" + view + "/factory/blue/" + blender.format(0) + ".png")));

    r.addTexture("target-red", new Texture(
            Gdx.files.internal(sqs + "/3d/" + set + "/" + view + "/target/red/" + blender.format(0) + ".png")));
    r.addTexture("target-blue", new Texture(Gdx.files
            .internal(sqs + "/3d/" + set + "/" + view + "/target/blue/" + blender.format(0) + ".png")));

    r.addTexture("wall", new Texture(
            Gdx.files.internal(sqs + "/3d/" + set + "/" + view + "/wall/" + blender.format(0) + ".png")));

    r.addTexture("shot-red", new Texture(Gdx.files.internal(sqs + "/shot-red.png")));
    r.addTexture("shot-blue", new Texture(Gdx.files.internal(sqs + "/shot-blue.png")));

    r.addTexture(ImprovementButton.IMPROVEMENT_BORDER,
            new Texture(Gdx.files.internal(sqs + "/improvement.png")));

    r.addTexture("noway", new Texture(Gdx.files.internal(sqs + "/noway.png")));
    r.addTexture("more_metal", new Texture(Gdx.files.internal(sqs + "/more_metal.png")));
    r.addTexture("increase_speed", new Texture(Gdx.files.internal(sqs + "/increase_speed.png")));
    r.addTexture("title", new Texture(Gdx.files.internal("title.png")));
    r.addTexture("background", new Texture(Gdx.files.internal("background.png")));

    r.addColor(Player.PLAYER_RED, Color.RED);
    r.addColor(Player.PLAYER_BLUE, Color.BLUE);

    r.addFont(Player.PLAYER_RED, GUIResources.createFont(GUIResources.DEFAULT_FONT,
            GUIResources.DEFAULT_FONT_SIZE, GUIResources.getInstance().getColor(Player.PLAYER_RED)));
    r.addFont(Player.PLAYER_BLUE, GUIResources.createFont(GUIResources.DEFAULT_FONT,
            GUIResources.DEFAULT_FONT_SIZE, GUIResources.getInstance().getColor(Player.PLAYER_BLUE)));
    r.addFont(UnitInfoBox.INFOBOX_FONT,
            GUIResources.createFont(GUIResources.DEFAULT_FONT, GUIResources.SMALL_FONT_SIZE, Color.YELLOW));
}

From source file:net.k3rnel.unsealed.battle.BattleEntity.java

License:Open Source License

/**
 * @param status the status to set//from  www  .  jav  a 2  s.c o m
 */
public void setStatus(int status) {
    this.status = status;
    switch (this.status) {
    case BattleEntity.statusNormal:
        break;
    case BattleEntity.statusBurned:
        actions =

                sequence(color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED),
                        delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED),
                        delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED),
                        delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.WHITE), run(new Runnable() {

                            @Override
                            public void run() {
                                setState(BattleEntity.statusNormal);
                            }
                        }));
        this.addAction(actions);
        break;
    case BattleEntity.statusStunned:
        actions =

                sequence(color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f),
                        color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW),
                        delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f),
                        color(Color.ORANGE), delay(0.1f), color(Color.WHITE), delay(0.1f), run(new Runnable() {

                            @Override
                            public void run() {
                                setStatus(BattleEntity.statusNormal);
                            }
                        }));
        this.addAction(actions);
        break;
    case BattleEntity.statusFrozen:
        this.status = statusStunned;
        actions =

                sequence(color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE),
                        delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f),
                        color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f),
                        color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.WHITE), run(new Runnable() {
                            @Override
                            public void run() {
                                setState(BattleEntity.statusNormal);
                            }
                        }));
        this.addAction(actions);
        break;
    case BattleEntity.statusPoisoned:
        actions = sequence(color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f),
                color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE),
                fadeIn(0.3f), run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }),

                color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.WHITE), run(new Runnable() {

                    @Override
                    public void run() {
                        setState(BattleEntity.statusNormal);
                    }
                }));
        this.getActions().clear();
        this.addAction(actions);
        break;
    }
}

From source file:net.noviden.towerdefense.MapEditor.MapEditorScreen.java

License:Open Source License

public void render(float deltaTime) {
    Gdx.gl.glClearColor(0, 0, 0.2f, 1);/*from  w w  w  .  j av a 2  s.c  o  m*/
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

    _orthoCamera.update();
    _spriteBatch.setProjectionMatrix(_orthoCamera.combined);
    _shapeRenderer.setProjectionMatrix(_orthoCamera.combined);

    _spriteBatch.begin();
    _shapeRenderer.begin();

    Path[] paths = _map.getPaths();
    for (int i = 0; i < paths.length; i++) {
        if (i == _selectedPathIndex) {
            _shapeRenderer.setColor(Color.GREEN);
        } else {
            _shapeRenderer.setColor(Color.BLUE);
        }

        for (int j = 0; j < (paths[i].set.size() - 1); j++) {
            Point a = paths[i].set.get(j), b = paths[i].set.get(j + 1);
            _shapeRenderer.line(a.x, a.y, b.x, b.y);

            _shapeRenderer.circle(a.x, a.y, 5.0f);
        }

        if (paths[i].set.size() > 0) {
            Point lastPoint = paths[i].set.get(paths[i].set.size() - 1);

            float length = 12.0f;
            _shapeRenderer.triangle(lastPoint.x, lastPoint.y, lastPoint.x - length, lastPoint.y - length,
                    lastPoint.x, lastPoint.y - length);
            _shapeRenderer.triangle(lastPoint.x, lastPoint.y, lastPoint.x + length, lastPoint.y + length,
                    lastPoint.x, lastPoint.y + length);
        }
    }

    if (_displayUnits) {
        for (UnitManager unitManager : _unitManagers) {
            if (unitManager != null) {
                unitManager.act(deltaTime, null);
                unitManager.draw(_shapeRenderer);
            }
        }
    }

    _shapeRenderer.end();
    _spriteBatch.end();

    stage.act(deltaTime);
    stage.draw();
}

From source file:net.noviden.towerdefense.TurretFactory.TurretManager.java

License:Open Source License

public void draw(ShapeRenderer shapeRenderer) {
    shapeRenderer.setColor(Color.BLUE);
    for (BaseTurret turret : turrets) {
        turret.draw(shapeRenderer);
    }
}