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

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

Introduction

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

Prototype

public Color cpy() 

Source Link

Usage

From source file:com.bladecoder.engine.model.Transition.java

License:Apache License

public void create(float time, Color color, Type type, ActionCallback cb) {
    this.currentTime = 0f;
    this.c = color.cpy();
    this.type = type;
    this.time = time;
    this.cb = cb;
}

From source file:com.lyeeedar.Roguelike3D.Graphics.Lights.LightManager.java

License:Open Source License

public Color calculateLightAtPoint(Vector3 position, Vector3 normal, boolean bakeStatics) {
    Color h_ambient = ambientLight.cpy().mul(0.5f);
    Color light_agg_col = h_ambient.add(calculateLight(ambientDir, h_ambient.cpy(), 0, 1, normal));

    if (!bakeStatics)
        return light_agg_col;

    for (PointLight pl : staticPointLights) {
        Vector3 l_vector = pl.position.cpy().sub(position);

        light_agg_col.add(calculateLight(l_vector, pl.getColour().cpy(), pl.attenuation, pl.power, normal));

    }//www .  j av  a2 s. c  o  m
    return light_agg_col;
}

From source file:com.lyeeedar.Roguelike3D.Graphics.Materials.ColorAttribute.java

License:Open Source License

/** Creates a {@link MaterialAttribute} that is a pure {@link Color}.
 * //from w w  w .j a va  2  s  .c  o  m
 * @param color The {@link Colour} that you wish the attribute to represent.
 * @param name The name of the uniform in the {@link ShaderProgram} that will have its value set to this color. (A 'name' does
 *           not matter for a game that uses {@link GL10}). */
public ColorAttribute(Color color, String name) {
    super(name);
    this.color = color.cpy();
}

From source file:de.bioviz.svg.SVGUtils.java

License:Open Source License

/**
 * Get the color for a lighter longNetIndicator.
 *
 * @param dropColor//  w ww. j a  v a  2 s.  c om
 *       the droplet to get the base color
 * @return the color for the lighter arrowHead or Color.DARK_GREY if the
 * colorfulExport is off
 */
public static Color getLighterLongNetIndicatorColor(final Color dropColor) {
    if (SVG_EXPORT_SETTINGS.getColorfulExport()) {
        return dropColor.cpy().sub(Colors.LONG_NET_INDICATORS_ON_DROPLET_DIFF);
    } else {
        return Color.BLACK;
    }
}

From source file:de.bioviz.svg.SVGUtils.java

License:Open Source License

/**
 * Get the color for a darker longNetIndicator.
 *
 * @param dropColor// w  ww  .  j  a  v a  2s .c o  m
 *       the droplet to get the base color
 * @return the color for the darker arrowHead or Color.DARK_GREY if the
 * colorfulExport is off
 */
public static Color getDarkerLongNetIndicatorColor(final Color dropColor) {
    if (SVG_EXPORT_SETTINGS.getColorfulExport()) {
        return dropColor.cpy().add(Colors.LONG_NET_INDICATORS_ON_DROPLET_DIFF);
    } else {
        return Color.BLACK;
    }
}

From source file:de.gebatzens.meteva.MarketLevel.java

License:Open Source License

public void render() {
    Color nc = new Color(1, 1, 1, 1).sub(color);
    nc.a = 0.6f;/*from  w ww . j ava2s  .  com*/
    GScout.drawBoxBorder(x, y, GScout.width * 0.25f, GScout.height * 0.08f, GScout.width * 0.005f, color,
            color.cpy().mul(new Color(0.5f, 0.5f, 0.5f, 1f)));
    GScout.batch.setColor(nc);
    GScout.drawBoxBorder(x, y, GScout.width * 0.25f * ((float) GScout.mprof.get(id) / (float) mlevel),
            GScout.height * 0.08f, GScout.width * 0.005f, nc, nc.cpy().mul(new Color(0.5f, 0.5f, 0.5f, 1f)));

    GScout.survivant.setColor(Color.BLACK);
    GScout.setFontSize(GScout.width * 0.04f);
    GScout.drawText(GScout.mprof.get(id) + "", x, y + GScout.height * 0.1f, true);

}