Esempio n. 1
0
 private void RefreshGui()
 {
     if (_viewModel.rootActiveSelf)
     {
         menuUiAdapter.SetCrossVisible(false);
     }
 }
Esempio n. 2
0
 public void ShowMenu(bool visible)
 {
     if (visible)
     {
         PlayerStateUtil.AddUIState(EPlayerUIState.ExitOpen, menuUiAdapter.gamePlay);
         menuUiAdapter.SetCrossVisible(false);
         _viewModel.rootActiveSelf = true;
         menuUiAdapter.RegisterKeyReceive(keyReceive);
         menuUiAdapter.RegisterPointerReceive(pointerReceiver);
     }
     else
     {
         PlayerStateUtil.RemoveUIState(EPlayerUIState.ExitOpen, menuUiAdapter.gamePlay);
         menuUiAdapter.SetCrossVisible(true);
         _viewModel.rootActiveSelf = false;
         menuUiAdapter.UnRegisterKeyReceive(keyReceive);
         menuUiAdapter.UnRegisterPointerReceive(pointerReceiver);
     }
     if (menuUiAdapter.Enable != visible)
     {
         menuUiAdapter.Enable = visible;
     }
 }