Example #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;
     }
 }
Example #2
0
 void RegisterReceive()
 {
     menuUiAdapter.RegisterKeyReceive(keyReceive);
     menuUiAdapter.RegisterPointerReceive(_pointerKeyHandler);
 }