Esempio n. 1
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;
     }
 }
Esempio n. 2
0
 void UnRegisterReceive()
 {
     menuUiAdapter.UnRegisterKeyReceive(keyReceive);
     menuUiAdapter.UnRegisterPointerReceive(_pointerKeyHandler);
 }