public void Update(GameTime gameTime) { if (gameManager.Type == LabiryntType.Prim) { if (controlManager.Keyboard.Clicked(KeyboardKeys.Z)) { AssetHolder.Instance.SelectedTexture = new List <Texture2D>() { AssetHolder.Instance.WallTexture }; labirynth.VertexMap.ForEach(i => i.changeTexture()); } if (controlManager.Keyboard.Clicked(KeyboardKeys.X)) { AssetHolder.Instance.SelectedTexture = AssetHolder.Instance.GandalfTextures; AssetHolder.Instance.GandalfMusicInstance.Stop(); AssetHolder.Instance.GandalfMusicInstance.Play(); labirynth.VertexMap.ForEach(i => i.changeTexture()); } } player.Update(gameTime, ref keys, minimap); keys.ForEach(i => i.Update(gameTime)); finishPoint.Update(gameTime, player, screenManager); ground.Update(gameTime, player); if (gameManager.Type == LabiryntType.Prim) { frustum = new BoundingFrustum(player.Camera.View * player.Camera.Projection); List <Cube> visible = labirynth.VertexMap.Where(m => frustum.Contains(m.BoundingBox) != ContainmentType.Disjoint).ToList(); visible.ForEach(i => i.Update(gameTime)); } skyBox.Update(gameTime); minimap.Update(controlManager, gameTime); }