[libgdx] Added skeleton.update(delta) to examples, even when physics is not used.

Missed one.
This commit is contained in:
Nathan Sweet 2024-01-18 10:32:37 -04:00
parent 55550c3490
commit ec1d6028c0

View File

@ -143,10 +143,12 @@ public class SimpleTest2 extends ApplicationAdapter {
}
public void render () {
state.update(Gdx.graphics.getDeltaTime()); // Update the animation time.
float delta = Gdx.graphics.getDeltaTime();
state.update(delta); // Update the animation time.
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
skeleton.update(delta); // Advance the skeleton time. This is needed when the skeleton has physics.
if (state.apply(skeleton)) // Poses skeleton using current animations. This sets the bones' local SRT.
skeleton.updateWorldTransform(Physics.update); // Uses the bones' local SRT to compute their world SRT.