From f2f1a8ce4613fbd462c3cf1618b594c5ab188908 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 14 Sep 2023 12:26:34 +0200 Subject: [PATCH] [haxe] Fix SkeletonSprite.advanceTime to use the actual delta time. --- spine-haxe/example/src/Main.hx | 2 +- spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/spine-haxe/example/src/Main.hx b/spine-haxe/example/src/Main.hx index 049695d29..63712f6ab 100644 --- a/spine-haxe/example/src/Main.hx +++ b/spine-haxe/example/src/Main.hx @@ -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()); } } diff --git a/spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx b/spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx index df78d62e6..7445b074b 100644 --- a/spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx +++ b/spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx @@ -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();