示例#1
0
 private void HandleKeyboardInput()
 {
     if (_platform.Input.HasEvent(UISButton.Left, true))
     {
         _activeCube.SelectPreviousItem();
     }
     else if (_platform.Input.HasEvent(UISButton.Right, true))
     {
         _activeCube.SelectNextItem();
     }
     else if (_platform.Input.HasEvent(UISButton.Enter, true))
     {
         ActivateSelectedItem();
     }
     else if (_platform.Input.HasEvent(UISButton.Escape, true) ||
              _platform.Input.HasEvent(UISButton.Back, true))
     {
         if (_activeCube.PreviousMenu != null)
         {
             _activeCube.Destroy();
             _activeCube = _activeCube.PreviousMenu;
             _platform.SoundManager.PlaySound(MenuEventSound);
         }
     }
 }
示例#2
0
        public override void OnClose()
        {
            base.OnClose();

            _mainMenuCube.Destroy();
            _optionsMenuCube.Destroy();

            GameWorldManager.Instance.Clear();
        }