Esempio n. 1
0
  public void setOpacity(int anOpacity) {
    opacity_ = anOpacity;

    // special opacity for premultiplied textures
    if (opacityModifyRGB_) setColor(colorUnmodified_);
    updateColor();
  }
Esempio n. 2
0
  public void setColor(ccColor3B color3) {
    color_.set(color3);
    colorUnmodified_.set(color3);

    if (opacityModifyRGB_) {
      color_.r = color3.r * opacity_ / 255;
      color_.g = color3.g * opacity_ / 255;
      color_.b = color3.b * opacity_ / 255;
    }

    updateColor();
  }