public override void Update(GameTime gametime) { base.Update(gametime); if (this.game.Mario.lives == 0 && !this.Sprites.Contains(this.gameOver)) { SoundFactory.PlaySoundEffect(SoundFactory.GameOver()); this.AddSprite(this.gameOver); int dy = 250; this.gameOver.Info.bounds = new Rectangle(this.gameOver.Info.x - 2, this.gameOver.Info.y - dy, this.gameOver.Info.spriteWidth + 2, this.gameOver.Info.spriteHeight + dy); this.gameOver.SetPosition(this.gameOver.Info.x, this.gameOver.Info.y - dy); this.gameOver.Info.acceleration.Y = 0.15f; foreach (InputController ic in SpriteLayer.CollisionLayer.InputControllers) { ic.Paused = true; } } else if (this.game.Mario.lives > 0 && this.Sprites.Contains(this.gameOver)) { this.RemoveSprite(this.gameOver); foreach (InputController ic in SpriteLayer.CollisionLayer.InputControllers) { ic.Paused = false; } } }