Ejemplo n.º 1
0
  @Override
  public void update() {
    super.update();

    if (visible && lightness > 0.5) {
      if ((lightness -= Game.elapsed) > 0.5) {
        bg.ra = bg.ga = bg.ba = 2 * lightness - 1;
        bg.rm = 2 * r * (1 - lightness);
        bg.gm = 2 * g * (1 - lightness);
        bg.bm = 2 * b * (1 - lightness);
      } else {
        bg.hardlight(r, g, b);
      }
    }
  }