public override void Draw(GameTime gameTime) { ScreenManager.Game.GraphicsDevice.Clear(new Color(37, 59, 89)); skyBGParallax.Draw(ScreenManager.SpriteBatch, 90); waterParallax.Draw(ScreenManager.SpriteBatch, false, 90); cloudsParallax.Draw(ScreenManager.SpriteBatch, true, 90); ScreenManager.SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); //ScreenManager.SpriteBatch.Draw(ScreenManager.blankTexture, new Rectangle(0,0,ScreenManager.Game.RenderWidth,ScreenManager.Game.RenderHeight), null, new Color(200,0,0)); ScreenManager.SpriteBatch.Draw(texLogo, new Vector2(ScreenManager.Game.RenderWidth / 2, (ScreenManager.Game.RenderHeight / 2) - 40), new Rectangle(0, 0, 195, 65), Color.White, 0f, new Vector2(98, 32), 1f, SpriteEffects.None, 0); ScreenManager.SpriteBatch.End(); ScreenManager.SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); string fluff = "@garethiw and @gredgie for LD29"; ScreenManager.SpriteBatch.DrawString(ScreenManager.FontSmall, fluff, new Vector2(ScreenManager.Game.RenderWidth / 2, ScreenManager.Game.RenderHeight - 30) + Vector2.One, Color.Black, 0f, ScreenManager.FontSmall.MeasureString(fluff) / 2, 1f, SpriteEffects.None, 0); ScreenManager.SpriteBatch.DrawString(ScreenManager.FontSmall, fluff, new Vector2(ScreenManager.Game.RenderWidth / 2, ScreenManager.Game.RenderHeight - 30), Color.DarkGray, 0f, ScreenManager.FontSmall.MeasureString(fluff) / 2, 1f, SpriteEffects.None, 0); fluff = "WASD/Arrows, X/Space or 360 pad"; ScreenManager.SpriteBatch.DrawString(ScreenManager.FontSmall, fluff, new Vector2(ScreenManager.Game.RenderWidth / 2, ScreenManager.Game.RenderHeight - 22) + Vector2.One, Color.Black, 0f, ScreenManager.FontSmall.MeasureString(fluff) / 2, 1f, SpriteEffects.None, 0); ScreenManager.SpriteBatch.DrawString(ScreenManager.FontSmall, fluff, new Vector2(ScreenManager.Game.RenderWidth / 2, ScreenManager.Game.RenderHeight - 22), Color.DarkGray, 0f, ScreenManager.FontSmall.MeasureString(fluff) / 2, 1f, SpriteEffects.None, 0); ScreenManager.SpriteBatch.End(); cloudsParallax.Draw(ScreenManager.SpriteBatch, false, 90); waterParallax.Draw(ScreenManager.SpriteBatch, true, 90); ScreenManager.FadeBackBufferToBlack(1f - TransitionAlpha); base.Draw(gameTime); }
public override void Draw(GameTime gametime, SpriteBatch g) { Parallax.Draw(g); if (fin) { g.Draw(RessourceSonic3.Act2Signe, new Vector2(250, 100), Color.White); } }
public override void Draw(Color color) { base.Draw(color); // Drawing the parallax stuff parallax.Draw(); ammoBox.Draws(); ammoBox.Draw(); // Testing stuff below if (tank2.tankObject != null) { tank2.Draw(); bullets2.Draw(); tank2.collider.DrawRec(CUtils.RandomColor()); tank2Timer += deltaTimes; if (tank2Timer >= 0.2f) { tankLineColor = CUtils.RandomColor(); tank2Timer = 0; } if (tank.tankObject != null) { DrawLineBezier(tank2.position, tank2.currentTarget, 4, tankLineColor); } } if (tank.tankObject != null) { tank.Draw(); tank.collider.DrawRec(CUtils.RandomColor()); bullets.Draw(); } if (explodedTank) { texture = tankAni.PlayAndStop(); DrawTexture(texture, (int)tank.lastPosition.x, (int)tank.lastPosition.y, Color.WHITE); if (!tankAni.isActive) { explodedTank = false; } } if (explodedTank2) { texture = tankAni.PlayAndStop(); DrawTexture(texture, (int)tank2.lastPosition.x, (int)tank2.lastPosition.y, Color.WHITE); if (!tankAni.isActive) { explodedTank2 = false; } } }
public override void Draw(SpriteBatch _SpriteBatch, GameTime _GameTime) { BackgroundSB.Begin(); Background.Draw(BackgroundSB, _GameTime); BackgroundSB.End(); worldRender.Draw(_GameTime, Pause); if (Pause) { _SpriteBatch.FillRectangle(new Rectangle(0, 0, Common.graphics.PreferredBackBufferWidth, Common.graphics.PreferredBackBufferHeight), new Color(0, 0, 0, 150)); } gameUI.Draw(_SpriteBatch, _GameTime); base.Draw(_SpriteBatch, _GameTime); }
public override void Draw(Color color) { // Drawing the buttons and text base.Draw(color); parallax.Draw(); DrawText("Image", 300, 340, 14, Color.RED); DrawTexture(imgTexture, 300, 300, Color.WHITE); tank.Draw(); DrawTexts(); CheckText(); DrawGeneralButtons(); DrawTankButtons(); DrawParallaxButtons(); DrawText("You can click on the file locations to open it. \n\nClick start to go in the start menu \nand click the back button to go back.\n\n " + "You can also change the parallax background by going in\n backgrounds and going into one of the folders.\n\n " + "You can also change the tank \nsprite/bullet/barrel sprite by clicking on a image." , 100, GetScreenHeight() - 300, 14, textzColor); }
// Drawing the button and make it so the player can interact with it public override void Draw(Color color) { base.Draw(color); parallax.Draw(); DrawText("You lose", (int)losePos.x + 75, (int)losePos.y, 16, Color.PINK); retryButton.DrawRecText(retryPos, retrySize, "Retry", 16, retryColor, Color.MAGENTA); quitButton.DrawRecText(quitPos, quitSize, "Quit", 16, quitColor, Color.MAGENTA); textBox.Draw(textboxPos, textboxSize, 4, Color.PINK, Color.GOLD, Color.MAGENTA); text.DrawTextAnimation($"Enter Player Name: {textBox.GetLetters()}/{textBox.GetMaxLetters()}", 14, Color.MAGENTA, (int)textboxPos.x, (int)textboxPos.y / 2, 0.08f, deltaTime); EditButton(); // Interaction code with the button if (retryButton.isOnButton) { retryButton.collider.DrawRec(5, Color.PURPLE); retryColor = darkPurple; } else { retryColor = lightPurple; } if (retryButton.onClick) { ChangeLevel("01"); } if (quitButton.isOnButton) { quitButton.collider.DrawRec(5, Color.PURPLE); quitColor = darkPurple; } else { quitColor = lightPurple; } if (quitButton.onClick) { Game.Close(); } if (textBox.isOnTextBox && !textBox.clickedOnTextBox) { textBox.collider.DrawRec(4, Color.ORANGE); } }
//private bool tradeFlash = false; public override void Draw(GameTime gameTime) { Vector2 center = new Vector2(ScreenManager.Game.RenderWidth, ScreenManager.Game.RenderHeight) / 2f; SpriteBatch sb = ScreenManager.SpriteBatch; ScreenManager.Game.GraphicsDevice.Clear(Color.Black); if (!_firstWave) { ScreenManager.Game.GraphicsDevice.Clear(new Color(37, 59, 89)); sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); sb.Draw(ScreenManager.blankTexture, new Rectangle(0, (int)waterLevel - ((int)camera.Position.Y - ScreenManager.Game.RenderHeight / 2), ScreenManager.Game.RenderWidth, ((map.TileHeight * map.Height) + 10) - (int)waterLevel), null, new Color(0, 16, 65)); sb.End(); underwaterBGParallax.Draw(sb, camera.Position.Y); skyBGParallax.Draw(sb, camera.Position.Y); waterParallax.Draw(sb, false, camera.Position.Y); rocksParallax.Draw(sb, false, camera.Position.Y); cloudsParallax.Draw(sb, true, camera.Position.Y); particleController.Draw(sb, camera, map, 0); sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, camera.CameraMatrix); map.DrawLayer(sb, "fg", camera); playerShip.Draw(sb, map, ScreenManager.Font); sb.End(); enemyController.Draw(sb, camera, map); particleController.Draw(sb, camera, map, 1); projectileController.Draw(sb, camera, map); powerupController.Draw(sb, camera, map); rocksParallax.Draw(sb, true, camera.Position.Y); cloudsParallax.Draw(sb, false, camera.Position.Y); sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); sb.Draw(ScreenManager.blankTexture, new Rectangle(0, (int)waterLevel - ((int)camera.Position.Y - ScreenManager.Game.RenderHeight / 2) - 5, ScreenManager.Game.RenderWidth, ((map.TileHeight * map.Height) + 10) - (int)waterLevel), null, Color.Black * 0.4f); sb.End(); //sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); //Enemy head = EnemyController.Instance.Enemies.FirstOrDefault(en => en is Boss && ((Boss)en).Head); //if (head != null) sb.DrawString(ScreenManager.Font, head.Position.ToString(), Vector2.One * 10, Color.White); //sb.End(); waterParallax.Draw(sb, true, camera.Position.Y); } if (_endOfWave) { sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); sb.Draw(ScreenManager.blankTexture, new Rectangle(0, 0, ScreenManager.Game.RenderWidth, ScreenManager.Game.RenderHeight), null, Color.White * _waveFade); if (_tradecost > 0 && !_trading && (Ship.Instance.PowerUpMeter > 0 || Ship.Instance.PowerUpLevel > 0)) { string tradetext = "Press fire to trade " + _tradecost + " power for health"; // sb.DrawString(ScreenManager.FontSmall, tradetext, center + new Vector2(0, -50) + Vector2.One, Color.Black * _waveFade, 0f, ScreenManager.FontSmall.MeasureString(tradetext) / 2,1f, SpriteEffects.None, 0); sb.DrawString(ScreenManager.FontSmall, tradetext, center + new Vector2(0, -50), Color.DarkRed * _waveFade, 0f, ScreenManager.FontSmall.MeasureString(tradetext) / 2, 1f, SpriteEffects.None, 0); } int numdigits = GameController.Wave.ToString().Length; int wavepos = -38 - 10 - (numdigits * 8); sb.Draw(text, center + new Vector2(wavepos, -16), new Rectangle(68, 66, 77, 32), Color.White * _waveFade); for (int i = 0; i < numdigits; i++) { sb.Draw(text, center + new Vector2(wavepos + 77 + 10 + (i * 16), -16), new Rectangle(Convert.ToInt32(GameController.Wave.ToString().Substring(i, 1)) * 32, 116, 32, 32), Color.White * _waveFade); } sb.End(); } if (_gameOver) { sb.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null); sb.Draw(ScreenManager.blankTexture, new Rectangle(0, 0, ScreenManager.Game.RenderWidth, ScreenManager.Game.RenderHeight), null, Color.Black * 0.2f * _goFade); sb.Draw(text, center + new Vector2(-47, -32), new Rectangle(196, 0, 94, 65), Color.White * _goFade); sb.End(); } hud.Draw(sb, new Viewport(0, 0, ScreenManager.Game.RenderWidth, ScreenManager.Game.RenderHeight), camera, !_endOfWave, ScreenManager.Font, (map.Width * map.TileWidth)); //ScreenManager.FadeBackBufferToBlack(1f - TransitionAlpha); base.Draw(gameTime); }
/// <summary> /// This is to draw the Game Manager's Classes and Objects /// </summary> /// <param name="gameTime"><This is to check the run time./param> public override void Draw(GameTime gameTime) { spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointWrap, null, null, null, camera.GetTransformation()); { if (!levelLoaded) { platformRectangles.RemoveRange(0, platformRectangles.Count); platformList.RemoveRange(0, platformList.Count); cEnemyList.RemoveRange(0, cEnemyList.Count); sEnemyList.RemoveRange(0, sEnemyList.Count); tEnemyList.RemoveRange(0, tEnemyList.Count); SpawnBricks(level); levelLoaded = true; } if (level <= 2) { plainsParallax1Background.Draw(gameTime, spriteBatch); plainsParallax2Background.Draw(gameTime, spriteBatch); plainsParallax3Background.Draw(gameTime, spriteBatch); } if (level == 3) { plainsParallax1Background.Draw(gameTime, spriteBatch); plainsParallax2Background.Draw(gameTime, spriteBatch); plainsParallax3Background.Draw(gameTime, spriteBatch); villageParallax1Background.Draw(gameTime, spriteBatch); } if (level == 4) { forestParallax1Background.Draw(gameTime, spriteBatch); forestParallax2Background.Draw(gameTime, spriteBatch); forestParallax3Background.Draw(gameTime, spriteBatch); } if (level >= 5) { caveParallax1Background.Draw(gameTime, spriteBatch); caveParallax2Background.Draw(gameTime, spriteBatch); caveParallax3Background.Draw(gameTime, spriteBatch); } if ((level >= 1 && level <= 3) && !musicStarted) { MediaPlayer.Stop(); MediaPlayer.Play(plainsvillagesSong); musicStarted = true; } if (level == 4 && !musicStarted) { MediaPlayer.Stop(); MediaPlayer.Play(forestSong); musicStarted = true; } if ((level >= 5 && level <= 6) && !musicStarted) { MediaPlayer.Stop(); MediaPlayer.Play(caveSong); musicStarted = true; } if (level == 7 && !musicStarted) { MediaPlayer.Stop(); MediaPlayer.Play(finalBossSong); musicStarted = true; } foreach (Tile pm in platformList) { pm.Draw(gameTime, spriteBatch); } } spriteBatch.End(); // Draw the player and enemies. spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, camera.GetTransformation()); { player.Draw(gameTime, spriteBatch); foreach (Enemy ce in cEnemyList) { ce.Draw(gameTime, spriteBatch); } foreach (Enemy se in sEnemyList) { se.Draw(gameTime, spriteBatch); } foreach (Enemy te in tEnemyList) { te.Draw(gameTime, spriteBatch); } if (BossCreated && !bhEnemy.Dead) { bhEnemy.Draw(gameTime, spriteBatch); bflEnemy.Draw(gameTime, spriteBatch); bfrEnemy.Draw(gameTime, spriteBatch); } } spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointWrap, null, null); { spriteBatch.Draw(debugDotTexture, new Rectangle(15, 15, (int)(player._Mana.mana * 2), 10), Color.Red); if (BossCreated && !bhEnemy.Dead) { spriteBatch.Draw(debugDotTexture, new Rectangle((int)myGame.WindowSize.X - (27 * 2), 15, (int)bhEnemy.Lives * 8, 10), Color.Purple); } } spriteBatch.End(); spriteBatch.Begin(); { if (bhEnemy.Dead) { spriteBatch.DrawString(wintext, "Y O U W I N ! ! !", new Vector2((myGame.WindowSize.X - wintext.MeasureString("Y O U W I N ! ! !").X) / 2, 25), Color.OrangeRed); timer -= gameTime.ElapsedGameTime.Milliseconds; if (timer <= 0) { myGame.SetCurrentLevel(Game1.GameLevels.MENU); timer = 10000; } } } spriteBatch.End(); // Debug Rectangles spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointWrap, null, null, null, camera.GetTransformation()); { /* * for (int i = 0; i < platformRectangles.Count; i++) * { * spriteBatch.Draw(debugDotTexture, new Rectangle((int)platformRectangles[i].X, (int)platformRectangles[i].Y, (int)platformRectangles[i].Width, 1), new Color(i % 2.2f, i % 2.1f, i % 2.0f)); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)platformRectangles[i].X + (int)platformRectangles[i].Width, (int)platformRectangles[i].Y, 1, (int)platformRectangles[i].Height), new Color(i % 2.2f, i % 2.1f, i % 2.0f)); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)platformRectangles[i].X, (int)platformRectangles[i].Y + (int)platformRectangles[i].Height, (int)platformRectangles[i].Width, 1), new Color(i % 2.2f, i % 2.1f, i % 2.0f)); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)platformRectangles[i].X, (int)platformRectangles[i].Y, 1, (int)platformRectangles[i].Height), new Color(i % 2.2f, i % 2.1f, i % 2.0f)); * } * spriteBatch.Draw(debugDotTexture, new Rectangle((int)PlayerCollisions.X, (int)PlayerCollisions.Y, (int)PlayerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)PlayerCollisions.X + (int)PlayerCollisions.Width, (int)PlayerCollisions.Y, 1, (int)PlayerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)PlayerCollisions.X, (int)PlayerCollisions.Y + (int)PlayerCollisions.Height, (int)PlayerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)PlayerCollisions.X, (int)PlayerCollisions.Y, 1, (int)PlayerCollisions.Height), Color.Yellow); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bhEnemy.playerCollisions.X, (int)bhEnemy.playerCollisions.Y, (int)bhEnemy.playerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bhEnemy.playerCollisions.X + (int)bhEnemy.playerCollisions.Width, (int)bhEnemy.playerCollisions.Y, 1, (int)bhEnemy.playerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bhEnemy.playerCollisions.X, (int)bhEnemy.playerCollisions.Y + (int)bhEnemy.playerCollisions.Height, (int)bhEnemy.playerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bhEnemy.playerCollisions.X, (int)bhEnemy.playerCollisions.Y, 1, (int)bhEnemy.playerCollisions.Height), Color.Yellow); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bfrEnemy.playerCollisions.X, (int)bfrEnemy.playerCollisions.Y, (int)bfrEnemy.playerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bfrEnemy.playerCollisions.X + (int)bfrEnemy.playerCollisions.Width, (int)bfrEnemy.playerCollisions.Y, 1, (int)bfrEnemy.playerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bfrEnemy.playerCollisions.X, (int)bfrEnemy.playerCollisions.Y + (int)bfrEnemy.playerCollisions.Height, (int)bfrEnemy.playerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bfrEnemy.playerCollisions.X, (int)bfrEnemy.playerCollisions.Y, 1, (int)bfrEnemy.playerCollisions.Height), Color.Yellow); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bflEnemy.playerCollisions.X, (int)bflEnemy.playerCollisions.Y, (int)bflEnemy.playerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bflEnemy.playerCollisions.X + (int)bflEnemy.playerCollisions.Width, (int)bflEnemy.playerCollisions.Y, 1, (int)bflEnemy.playerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bflEnemy.playerCollisions.X, (int)bflEnemy.playerCollisions.Y + (int)bflEnemy.playerCollisions.Height, (int)bflEnemy.playerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)bflEnemy.playerCollisions.X, (int)bflEnemy.playerCollisions.Y, 1, (int)bflEnemy.playerCollisions.Height), Color.Yellow); * for (int i = 0; i < cEnemyList.Count; i++) * { * spriteBatch.Draw(debugDotTexture, new Rectangle((int)cEnemyList[i].playerCollisions.X, (int)cEnemyList[i].playerCollisions.Y, (int)cEnemyList[i].playerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)cEnemyList[i].playerCollisions.X + (int)cEnemyList[i].playerCollisions.Width, (int)cEnemyList[i].playerCollisions.Y, 1, (int)cEnemyList[i].playerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)cEnemyList[i].playerCollisions.X, (int)cEnemyList[i].playerCollisions.Y + (int)cEnemyList[i].playerCollisions.Height, (int)cEnemyList[i].playerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)cEnemyList[i].playerCollisions.X, (int)cEnemyList[i].playerCollisions.Y, 1, (int)cEnemyList[i].playerCollisions.Height), Color.Yellow); * } * for (int i = 0; i < tEnemyList.Count; i++) * { * spriteBatch.Draw(debugDotTexture, new Rectangle((int)tEnemyList[i].playerCollisions.X, (int)tEnemyList[i].playerCollisions.Y, (int)tEnemyList[i].playerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)tEnemyList[i].playerCollisions.X + (int)tEnemyList[i].playerCollisions.Width, (int)tEnemyList[i].playerCollisions.Y, 1, (int)tEnemyList[i].playerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)tEnemyList[i].playerCollisions.X, (int)tEnemyList[i].playerCollisions.Y + (int)tEnemyList[i].playerCollisions.Height, (int)tEnemyList[i].playerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)tEnemyList[i].playerCollisions.X, (int)tEnemyList[i].playerCollisions.Y, 1, (int)tEnemyList[i].playerCollisions.Height), Color.Yellow); * } * for (int i = 0; i < sEnemyList.Count; i++) * { * spriteBatch.Draw(debugDotTexture, new Rectangle((int)sEnemyList[i].playerCollisions.X, (int)sEnemyList[i].playerCollisions.Y, (int)sEnemyList[i].playerCollisions.Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)sEnemyList[i].playerCollisions.X + (int)sEnemyList[i].playerCollisions.Width, (int)sEnemyList[i].playerCollisions.Y, 1, (int)sEnemyList[i].playerCollisions.Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)sEnemyList[i].playerCollisions.X, (int)sEnemyList[i].playerCollisions.Y + (int)sEnemyList[i].playerCollisions.Height, (int)sEnemyList[i].playerCollisions.Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)sEnemyList[i].playerCollisions.X, (int)sEnemyList[i].playerCollisions.Y, 1, (int)sEnemyList[i].playerCollisions.Height), Color.Yellow); * } * for (int i = 0; i < mapSegments.Count; i++) * { * spriteBatch.Draw(debugDotTexture, new Rectangle((int)mapSegments[i].X, (int)mapSegments[i].Y, (int)mapSegments[i].Width, 1), Color.Blue); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)mapSegments[i].X + (int)mapSegments[i].Width, (int)mapSegments[i].Y, 1, (int)mapSegments[i].Height), Color.Red); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)mapSegments[i].X, (int)mapSegments[i].Y + (int)mapSegments[i].Height, (int)mapSegments[i].Width, 1), Color.Green); * spriteBatch.Draw(debugDotTexture, new Rectangle((int)mapSegments[i].X, (int)mapSegments[i].Y, 1, (int)mapSegments[i].Height), Color.Yellow); * } */ } spriteBatch.End(); spriteBatch.Begin(); { // To debug variables. //debugLabel.Draw(gameTime, spriteBatch); } spriteBatch.End(); base.Draw(gameTime); }