Skip to content

Commit

Permalink
[haxe] Fix SkeletonSprite.advanceTime to use the actual delta time.
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Sep 14, 2023
1 parent 8f8bf06 commit f2f1a8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion spine-haxe/example/src/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ class Main extends Sprite {
starlingSingleton.start();
Starling.current.stage.color = 0x000000;

SceneManager.getInstance().switchScene(new SequenceExample());
SceneManager.getInstance().switchScene(new BasicExample());
}
}
7 changes: 1 addition & 6 deletions spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,8 @@ class SkeletonSprite extends DisplayObject implements IAnimatable {
return _smoothing;
}

var updated = false;

public function advanceTime(time:Float):Void {
if (!updated) {
// updated = true;
_state.update(0.016 * 0.1);
}
_state.update(time);
_state.apply(skeleton);
skeleton.updateWorldTransform();
this.setRequiresRedraw();
Expand Down

0 comments on commit f2f1a8c

Please sign in to comment.