support xbox deploy

GitOrigin-RevId: c8a9a06bf9d129530f1b251267d3ab62334c49c2
This commit is contained in:
Colin McMillen 2019-12-08 08:28:17 -05:00
parent fb50667459
commit 6bb646e2ce

View File

@ -63,12 +63,13 @@ namespace Jumpy {
protected override void Draw(GameTime gameTime) { protected override void Draw(GameTime gameTime) {
GraphicsDevice.Clear(Color.CornflowerBlue); GraphicsDevice.Clear(Color.CornflowerBlue);
const int spriteSize = 144;
int frameNum = gameTime.TotalGameTime.Milliseconds / 250; int frameNum = gameTime.TotalGameTime.Milliseconds / 250;
if (frameNum == 3) { if (frameNum == 3) {
frameNum = 1; frameNum = 1;
} }
int sourceX = 144 * frameNum + 144 * 6; int sourceX = spriteTileSize * frameNum + spriteTileSize * 3;
int sourceY = 144 * 0; int sourceY = spriteTileSize * 0;
Rectangle source = new Rectangle(sourceX, sourceY, 144, 144); Rectangle source = new Rectangle(sourceX, sourceY, 144, 144);
// Vector2 position = new Vector2(0, 0); // Vector2 position = new Vector2(0, 0);
Vector2 position = new Vector2(100, 100); Vector2 position = new Vector2(100, 100);