public override void Update(GameTime gameTime) { // keys reaction if (game.newKey(Keys.Up)) { SelectPrevItem(); } if (game.newKey(Keys.Down)) { SelectNextItem(); } base.Update(gameTime); }
public override void Update(GameTime gameTime) { /*--------------------create Bubble Efect for title-------------------*/ scale += deltaScale; if (scale > 1.273f) { deltaScale *= -1; } else if (scale < 1.1f) { deltaScale = (float)Math.Abs(deltaScale); } /*-------------------------Enter reactions of menu items---------------------------*/ if (game.newKey(Keys.Enter)) { switch (menuItems.selectedItem.text) { case "START": game.SwitchWindow(game.gameLevel); break; case "INSTRUCTIONS": break; case "AUTHORS": break; case "\nEND": game.Exit(); break; } } base.Update(gameTime); }