/// <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) { Rectangle titleSafeRectangle = GraphicsDevice.Viewport.TitleSafeArea; //Ritar ut bakgrundsbild och en ram omkring den innan jag ritar ut bollen ballView.DrawLevel(backgroundTexture, titleSafeRectangle, frame, Color.Black, pixel); // Här ritas bollen ut ovanpå bakgrunden ballView.DrawBall(ballSimulation); shockwave.Draw(spriteBatch, (float)gameTime.ElapsedGameTime.TotalSeconds); splitterSystem.Draw(spriteBatch, particleTexture); explosion.Draw(spriteBatch, (float)gameTime.ElapsedGameTime.TotalSeconds); base.Draw(gameTime); }