public void ShowMenu(bool visible) { if (visible) { PlayerStateUtil.AddUIState(EPlayerUIState.ExitOpen, menuUiAdapter.gamePlay); menuUiAdapter.SetCrossVisible(false); _viewModel.rootActiveSelf = true; RegisterReceive(); } else { if (showNotice) { UiCommon.AlertManager.ClearQueueAndClose(); showNotice = false; } PlayerStateUtil.RemoveUIState(EPlayerUIState.ExitOpen, menuUiAdapter.gamePlay); menuUiAdapter.SetCrossVisible(true); _viewModel.rootActiveSelf = false; UnRegisterReceive(); } if (menuUiAdapter.Enable != visible) { menuUiAdapter.Enable = visible; } }
private void RegisterKeyReceiver() { _adapter.SetCrossVisible(false); PlayerStateUtil.AddUIState(EPlayerUIState.PaintOpen, _adapter.gamePlay); if (keyReveiver == null || pointerReceiver == null) { return; } _adapter.RegisterKeyReceive(keyReveiver); _adapter.RegisterPointerReceive(pointerReceiver); _haveRegister = true; }
private void SwitchToSendState() { ChatListState = EUIChatListState.Send; if (PlayerStateUtil.HasUIState(EPlayerUIState.ChatOpen, _chatState.gamePlay)) { PlayerStateUtil.RemoveUIState(EPlayerUIState.ChatOpen, _chatState.gamePlay); } else { PlayerStateUtil.AddUIState(EPlayerUIState.ChatOpen, _chatState.gamePlay); } _chatState.SetCrossVisible(true); ResetCloseViewAnim(); }
private void ShowMap(bool visible) { if (_viewInitialized) { if (visible && !_adapter.Enable) { _adapter.Enable = true; PlayerStateUtil.AddUIState(EPlayerUIState.MapOpen, _adapter.gamePlay); } else if (!visible && _adapter.Enable) { _adapter.Enable = false; PlayerStateUtil.RemoveUIState(EPlayerUIState.MapOpen, _adapter.gamePlay); } } }
public void ShowMap(bool visible) { if (root != null) { if (visible && !adapter.Enable) { adapter.Enable = true; PlayerStateUtil.AddUIState(EPlayerUIState.MapOpen, adapter.gamePlay); } else if (!visible && adapter.Enable) { adapter.Enable = false; PlayerStateUtil.RemoveUIState(EPlayerUIState.MapOpen, adapter.gamePlay); } } }
public override void DoAction(IEventArgs args) { EPlayerUIState uiState = (EPlayerUIState)FreeUtil.ReplaceInt(state, args); FreeData p = GetPlayer(args); if (p != null) { if (remove) { PlayerStateUtil.RemoveUIState(uiState, p.Player.gamePlay); } else { int realTime = FreeUtil.ReplaceInt(time, args); if (realTime > 0) { p.StateTimer.AddUITime(uiState, realTime); } PlayerStateUtil.AddUIState(uiState, p.Player.gamePlay); } } }
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; } }