From 1057889c2176dd74f3634bbfb4845e98ff9194b1 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Fri, 26 Mar 2021 09:48:16 +0100 Subject: [PATCH] [xna][monogame] Fixed examples using incorrect time update, leading to jittery playback. Closes #1868. --- spine-monogame/example/ExampleGame.cs | 2 +- spine-xna/example/src/ExampleGame.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-monogame/example/ExampleGame.cs b/spine-monogame/example/ExampleGame.cs index 3c5e9ee0c..27e537a59 100644 --- a/spine-monogame/example/ExampleGame.cs +++ b/spine-monogame/example/ExampleGame.cs @@ -294,7 +294,7 @@ namespace Spine { } protected override void Draw(GameTime gameTime) { - currentScreen.Render(gameTime.ElapsedGameTime.Milliseconds / 1000.0f); + currentScreen.Render((float)(gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0)); } } } diff --git a/spine-xna/example/src/ExampleGame.cs b/spine-xna/example/src/ExampleGame.cs index 9c42ed311..e2c8bd8e7 100644 --- a/spine-xna/example/src/ExampleGame.cs +++ b/spine-xna/example/src/ExampleGame.cs @@ -192,7 +192,7 @@ namespace Spine { protected override void Draw (GameTime gameTime) { GraphicsDevice.Clear(Color.Black); - state.Update(gameTime.ElapsedGameTime.Milliseconds / 1000f); + state.Update((float)(gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0)); state.Apply(skeleton); skeleton.UpdateWorldTransform(); if (skeletonRenderer.Effect is BasicEffect) {