public void Update() { var Input = gameModel.Input; var sm = gameModel.SoundManager; if (Input.keyPressed(Key.LeftArrow) || Input.buttonPressed(Dpad.LEFT)) { selected = vehiculos.ToArray().getNextOption(selected, -1); sm.PlaySound("menuLeft.wav"); } if (Input.keyPressed(Key.RightArrow) || Input.buttonPressed(Dpad.RIGHT)) { selected = vehiculos.ToArray().getNextOption(selected); sm.PlaySound("menuRight.wav"); } if (Input.keyPressed(Key.UpArrow) || Input.buttonPressed(Dpad.UP)) { var newColor = colors.getNextOption(selected.Color); selected.ChangeColor(newColor); } if (Input.keyPressed(Key.Return) || Input.buttonPressed(Button.START) || Input.buttonPressed(Button.X)) { sm.Mp3Player.stop(); sm.PlaySound("menuEngine.wav"); Thread.Sleep(1000); confirmed = true; } selected.SampleMesh.RotateY(FastMath.QUARTER_PI * gameModel.ElapsedTime); vehicleName.Text = selected.Name; if (Input.keyPressed(Key.Escape)) { sm.PlaySound("menuEnter.wav"); back = true; } }