From 6bb646e2ceb0ddd4a97475df24bb0e719d9cb166 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Sun, 8 Dec 2019 08:28:17 -0500 Subject: [PATCH] support xbox deploy GitOrigin-RevId: c8a9a06bf9d129530f1b251267d3ab62334c49c2 --- Jumpy.Shared/JumpyGame.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jumpy.Shared/JumpyGame.cs b/Jumpy.Shared/JumpyGame.cs index 3bc9bf8..80a681d 100644 --- a/Jumpy.Shared/JumpyGame.cs +++ b/Jumpy.Shared/JumpyGame.cs @@ -63,12 +63,13 @@ namespace Jumpy { protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); + const int spriteSize = 144; int frameNum = gameTime.TotalGameTime.Milliseconds / 250; if (frameNum == 3) { frameNum = 1; } - int sourceX = 144 * frameNum + 144 * 6; - int sourceY = 144 * 0; + int sourceX = spriteTileSize * frameNum + spriteTileSize * 3; + int sourceY = spriteTileSize * 0; Rectangle source = new Rectangle(sourceX, sourceY, 144, 144); // Vector2 position = new Vector2(0, 0); Vector2 position = new Vector2(100, 100);