initSound().loadResource();
}
if ((getLoadState() & RenderingSceneGL._GLLOADSTATE_Loaded) == 0) {
return this;
}
final Monitor monitor2 = imageSynch;
synchronized (monitor2) {
if (status() == Animation.PLAYING) {
if (elapsedTime() >= realTimeLengthNanos()) {
stop();
} else {
if (isReverseEnabled()) {
animator -= elapsedTickFrames();
} else {
animator += elapsedTickFrames();
}
lastTick = System.nanoTime();
}
}
animator = Math.min(animator, length - 1);
animator = Math.max(animator, 0);
float rCoord = (float) Sf3Texture3D._3DTexLayersAmount * animator;
float rCoordRange = Sf3Texture3D._3DTexLayersAmount * (length - 1);
if (status() == Animation.PLAYING) {
if (isReverseEnabled()) {
if (faders) {
rCoord = (1f - (float) elapsedTime() / (float) realTimeLengthNanos()) * rCoordRange;
}
} else {
if (faders) {
rCoord = (float) elapsedTime() / (float) realTimeLengthNanos() * rCoordRange;
}
}
}
getSprite(animator).setrCoord(rCoord);
if (status() == Animation.PLAYING) {
if ((isReverseEnabled() ? sfx_frame >= animator : sfx_frame <= animator) && sfx.isResourceLoaded()) {
if (!sfx_played) {
sfx_played = playSfx();
}
} else {
sfx_played = false;
}
}
monitor2.notify();
}
return this;
}