mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
[libgdx] Added skeleton.update(delta) to examples, even when physics is not used.
Missed one.
This commit is contained in:
parent
55550c3490
commit
ec1d6028c0
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user