protected void DrawViewport(Viewport vp, Matrix camMatrix) { GraphicsDevice.Viewport = vp; Tools.sb.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, null, null, null, null, camMatrix); Event_Draw?.Invoke();//draw hapend Tools.sb.End(); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); //btl.drawbackground(); //btl.drawfighters(); if (G.connectionState != OnlineState.Playing) { Event_Draw?.Invoke(); } currstate.Draw(gameTime, spriteBatch); base.Draw(gameTime); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); G.sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Matrix.CreateTranslation(-car.Position.X, -car.Position.Y, 0) * Matrix.CreateScale(1) * Matrix.CreateRotationZ(0) * Matrix.CreateTranslation(600, 350, 0)); Event_Draw?.Invoke(); G.sb.End(); base.Draw(gameTime); }