@Override public void init() { super.init(); counter = nFrames; inc = 1 / (float) nFrames; cel.setTransparency(0); cel.setActive(true); }
@Override public void exec() { counter--; float ratio = 1 - counter * inc; cel.setTransparency(ratio * 255); if (counter <= 0) { cel.setTransparency(255); release(); } }