public void LoadContent(ContentManager content) { this.content = content; InputManager.Instance.OnBackButtonClicked += InputManager_OnBackButtonClicked; using (ContentManager c = new ContentManager(content.ServiceProvider, content.RootDirectory)) try { map = c.Load <ActorMap>($"Maps/{firstMap}"); } catch { map = c.Load <ActorMap>($"Maps/1"); } map.LoadContent(content); map.PlayerKilled += Map_PlayerKilled; map.MapCompleted += Map_MapCompleted; Camera = new Camera2D(game, new Vector2(game.GetScaledResolution().X, game.GetScaledResolution().Y *(1 - guiSize))); Camera.Initialize(); Camera.CalculateDeadZone(map.Size, map.TileDimensions); Camera.Focus = map.Player; guiText = new Text(new Vector2(game.GetScaledResolution().X *0.06f, game.GetScaledResolution().Y *guiSize / 4), $"[{map.DiamondsRequired}]/{map.DiamondValue} [{map.DiamondsCollected}] {map.Time} {map.Score}", Color.White); guiText.LoadContent(content); }