Пример #1
0
 @Override
 public void init() {
   super.init();
   counter = nFrames;
   inc = 1 / (float) nFrames;
   cel.setTransparency(0);
   cel.setActive(true);
 }
Пример #2
0
  @Override
  public void exec() {
    counter--;
    float ratio = 1 - counter * inc;
    cel.setTransparency(ratio * 255);

    if (counter <= 0) {
      cel.setTransparency(255);
      release();
    }
  }