public MenuScreen(ContentManager content, GraphicsDeviceManager graphics) { _content = content; _graphics = graphics; _selected = Type.Menu.Menu; _menu = Type.Menu.Jogar; }
public void Update() { KeyboardState kbsKeyboard = Keyboard.GetState(); if (kbsKeyboard.IsKeyDown(Keys.Up)) { if (_menu == Type.Menu.Sair) { _menu = Type.Menu.Creditos; } else if (_menu == Type.Menu.Creditos) { _menu = Type.Menu.Ranking; } else if (_menu == Type.Menu.Ranking) { _menu = Type.Menu.Jogar; } } if (kbsKeyboard.IsKeyDown(Keys.Down)) { if (_menu == Type.Menu.Jogar) { _menu = Type.Menu.Ranking; } else if (_menu == Type.Menu.Ranking) { _menu = Type.Menu.Creditos; } else if (_menu == Type.Menu.Creditos) { _menu = Type.Menu.Sair; } } if ((kbsKeyboard.IsKeyDown(Keys.Enter)) || (kbsKeyboard.IsKeyDown(Keys.Space))) { _restart = true; _selected = _menu; } }