475476477478479480481482483484485
if (isReverseEnabled()) { timeFrame = realTimeLength() - timeFrame; } animator = Math.min(length - 1, Math.max(0, (int) Math.round(((float) timeFrame / (float) realTimeLength()) * (float) length))); position(animator); monitor.notify(); return animator; } } @Override
486487488489490491492493494495496
public SpriteGLHandler previous() { final Monitor monitor = imageSynch; synchronized (monitor) { pause(); animator = getAnimatorValue(PREVIOUS, animator); monitor.notify(); return getSprite(animator); } } @Override
501502503504505506507508509510511
@Override public void remove() { final Monitor monitor = imageSynch; synchronized (monitor) { frames.remove(animator); monitor.notify(); } } @Override public void rewind() {
516517518519520521522523524525526
animator = length - 1; } else { animator = 0; } sfx_played = false; monitor.notify(); } } /** * @param delay the delay in millis between each frame change, e.g.
653654655656657658659660661662663
} } else { sfx_played = false; } } monitor2.notify(); } return this; } float texPty = .5f;
697698699700701702703704705706707
*/ @Override public SpriteGLHandler getCurrentSprite() { final Monitor monitor = imageSynch; synchronized (monitor) { monitor.notify(); return getSprite(animator); } } @Override