void drawCharacterWindow(SpriteBatch spriteBatch, GameTime gameTime) { spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); Texture2D t = game.Terrain; Rectangle b = testw.b; //Top spriteBatch.Draw(t, new Vector2(b.Left + b.Width / 8, b.Top + b.Height / 8), null, new Rectangle(582, 321, 11, 11), null, 0, null, Color.White); spriteBatch.Draw(t, new Rectangle(b.Left + b.Width / 8 + 11, b.Top + b.Height / 8, b.Width - 2 * b.Width / 8 - 11, 11), new Rectangle(592, 321, 1, 11), Color.White); spriteBatch.Draw(t, new Vector2(b.Left + b.Width - b.Width / 8 + 11, b.Top + b.Height / 8), null, new Rectangle(582, 321, 11, 11), null, MathHelper.PiOver2, null, Color.White); //Center spriteBatch.Draw(t, null, new Rectangle(b.Left + b.Width / 8 + 11, b.Top + b.Height / 8 + 11, b.Height - 3 * b.Height / 8 - 2 * 11 + 1, 11), new Rectangle(592, 321, 1, 11), new Vector2(1, 11), -MathHelper.PiOver2, null, Color.White); spriteBatch.Draw(t, null, new Rectangle(b.Left + b.Width - b.Width / 8 + 11, b.Top + b.Height / 8 + 11, b.Height - 3 * b.Height / 8 - 2 * 11 + 1, 11), new Rectangle(592, 321, 1, 11), new Vector2(0, 0), MathHelper.PiOver2, null, Color.White); //Bottom spriteBatch.Draw(t, new Vector2(b.Left + b.Width / 8, b.Top + b.Height - 2 * b.Height / 8), null, new Rectangle(582, 321, 11, 11), Vector2.Zero, -MathHelper.PiOver2, null, Color.White); spriteBatch.Draw(t, null, new Rectangle(b.Left + b.Width / 8 + 11, b.Top + b.Height - 2 * b.Height / 8, b.Width - 2 * b.Width / 8 - 11, 11), new Rectangle(592, 321, 1, 11), new Vector2(1, 0), MathHelper.Pi, null, Color.White); spriteBatch.Draw(t, new Vector2(b.Left + b.Width - b.Width / 8 + 11, b.Top + b.Height - 2 * b.Height / 8), null, new Rectangle(582, 321, 11, 11), null, MathHelper.Pi, null, Color.White); spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, null, null); spriteBatch.Draw(t, null, new Rectangle(b.Left + b.Width / 8 + 7, b.Top + b.Height / 8 + 7, b.Width - 2 * b.Width / 8 - 2, b.Height - 3 * b.Height / 8 - 14), new Rectangle((int)(gameTime.TotalGameTime.TotalMilliseconds / 4), 0, b.Width - 206, 321), Vector2.Zero, 0, null, Color.White); int dy = (int)(10 * Math.Sin(gameTime.TotalGameTime.TotalMilliseconds / 200)); particleMashine1.draw(spriteBatch); particleMashine2.draw(spriteBatch); particleMashine3.draw(spriteBatch); particleMashine4.draw(spriteBatch); particleMashine5.draw(spriteBatch); particleMashine6.draw(spriteBatch); particleMashine7.draw(spriteBatch); if (player.highscore >= playerSkinNum * 2857) { spriteBatch.Draw(playerTexture, null, new Rectangle(viewport.Width / 2 - viewport.Width / 24 + 5, viewport.Height / 2 - viewport.Height / 8 + dy, viewport.Width / 12, viewport.Height / 4), new Rectangle(playerSkinNum * 400, 0, 400, 800), null, 0, null, Color.White); } else { spriteBatch.Draw(playerTexture, null, new Rectangle(viewport.Width / 2 - viewport.Width / 24 + 5, viewport.Height / 2 - viewport.Height / 8 + dy, viewport.Width / 12, viewport.Height / 4), new Rectangle(playerSkinNum * 400, 0, 400, 800), null, 0, null, Color.Black); } spriteBatch.DrawString(DarkJetpack.baseFont, player.highscore + "/" + playerSkinNum * 2857, new Vector2(windowBounds.X / 2 - windowBounds.X / 40, windowBounds.Y / 3 - 20), new Color(255, 134, 26), 0, Vector2.Zero, 1.4f, SpriteEffects.None, 1); spriteBatch.Draw(interferenceTexture, new Rectangle(b.Left + b.Width / 8 + 7, b.Top + b.Height / 8 + 7, b.Width - 2 * b.Width / 8 - 2, b.Height - 3 * b.Height / 8 - 14), Color.White * 0.2f); }
public void Draw(SpriteBatch spriteBatch) { pmF.draw(spriteBatch); pmS.draw(spriteBatch); if (flip) { spriteBatch.Draw(texture, null, Rectangle, new Rectangle(400 * skinNum, 0, 400, 800), null, Rotation, null, Color.White, SpriteEffects.FlipHorizontally); } else { spriteBatch.Draw(texture, null, Rectangle, new Rectangle(400 * skinNum, 0, 400, 800), null, Rotation, null, Color.White, SpriteEffects.None); } if (DarkJetpack.isDebug) { spriteBatch.Draw(DarkJetpack.baseTexture, RectangleCollide, new Color(Color.HotPink, 0.2f)); } }