public void OnLeave(ChatBoxState state) { if (m_ChatBoxState.GetChatBoxState() == state) { m_ChatBoxState.OnLeave(); } }
override public void OnEnter(ChatBoxState oldState) { LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_SYSTEM); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_ZONE); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_NEARBY); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_TEAMMATE); View.SetActive(true); View.SetHide(false); // 设置需要显示的频道选项对应的频道 View.m_dropDownIndexToChannel = new EMChatChannelType[] { EMChatChannelType.CHAT_CHANNEL_WORLD, EMChatChannelType.CHAT_CHANNEL_CLAN, EMChatChannelType.CHAT_CHANNEL_KIN, EMChatChannelType.CHAT_CHANNEL_MATCHROOM, EMChatChannelType.CHAT_CHANNEL_CAMP, EMChatChannelType.CHAT_CHANNEL_PRIVATE, }; View.refreshChannelDropDown(); View.ChangeChannel((int)EMChatChannelType.CHAT_CHANNEL_CAMP); View.ClearChannelMaskItem(); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_All); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Personal); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Public); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Room); View.m_DiyChannelGroupItem = View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Diy); View.m_DiyChannelGroupItem.setChannelMask(View.m_DiyChannelMask); // 默认选择房间 View.channelMaskButtonGroup.SetItemSelectedItem(3, true); // 放大聊听框 View.SetSize(View.m_InitSize); if (View.IsVisible()) { View.StartCoroutine(View.showLastChatContent()); } // fps英雄鼠标操作提示位置 View.fpsSwitchHint.GetComponent <RectTransform>().anchoredPosition = View.fpsHintInitPosition; // 调整聊天框层级 View.transform.SetAsLastSibling(); View.gameObject.SetActive(true); (View.m_wnd as ChatBoxWnd).resetAllSortingOrder(); View.SetHide(false); View.SetChatWndViewPositionChange(ChatPositionChangeType.CPCY_MOVEDOWN); m_HideTime = Time.time; View.DelayChatMessageUpdate(); }
override public void OnEnter(ChatBoxState oldState) { // 清空消息 LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_MATCHROOM); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_CAMP); View.SetMinState(true); }
public void OnEnter(ChatBoxState newState) { ChatBoxState oldState = m_ChatBoxState.GetChatBoxState(); switch (newState) { case ChatBoxState.StaticState: { m_ChatBoxState = new ChatBoxStaticScene(this); } break; case ChatBoxState.StaticStateFullScreen: { m_ChatBoxState = new ChatBoxStaticSceneFullScreen(this); } break; case ChatBoxState.WarLoadingState: { m_ChatBoxState = new ChatBoxWarLoading(this); } break; case ChatBoxState.WarState: { m_ChatBoxState = new ChatBoxWarScene(this); } break; case ChatBoxState.RoomState: { m_ChatBoxState = new ChatBoxMatchRoom(this); } break; case ChatBoxState.StaticStatePopup: { m_ChatBoxState = new ChatBoxStaticScenePopup(this); } break; default: { Debug.LogWarning(String.Format("Error ChatBoxState,{0}", newState)); } break; } m_ChatBoxState.OnEnter(oldState); }
override public void OnEnter(ChatBoxState oldState) { LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_SYSTEM); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_ZONE); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_NEARBY); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_TEAMMATE); View.SetActive(true); View.SetHide(false); View.setActiveChatFrame(); // 显示频道组选择框 View.channelCanvasGroup.gameObject.SetActive(true); // 显示最小化按钮 View.minimunCanvasGroup.gameObject.SetActive(true); // 设置需要显示的频道选项对应的频道 View.m_dropDownIndexToChannel = new EMChatChannelType[] { EMChatChannelType.CHAT_CHANNEL_WORLD, EMChatChannelType.CHAT_CHANNEL_CLAN, EMChatChannelType.CHAT_CHANNEL_KIN, EMChatChannelType.CHAT_CHANNEL_WARSCENE, EMChatChannelType.CHAT_CHANNEL_NEARBY, EMChatChannelType.CHAT_CHANNEL_CAMP, EMChatChannelType.CHAT_CHANNEL_PRIVATE, }; View.refreshChannelDropDown(); View.ChangeChannel((int)EMChatChannelType.CHAT_CHANNEL_CAMP); View.m_hideFrameAlpha = 0f; View.m_hideContentAlpha = 0f; View.ClearChannelMaskItem(); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_All); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_WarScene); // 默认选择区域 View.channelMaskButtonGroup.SetItemSelectedItem(1, true); View.SetChatWndViewPositionChange(ChatPositionChangeType.CPCY_MOVEUP); View.fpsSwitchHint.GetComponent <RectTransform>().anchoredPosition = View.fpsHintInitPosition; // 隐藏频道选择按钮组 View.channelCanvasGroup.gameObject.SetActive(false); // 设置初始大小 //View.SetSize(new Vector2(320f, 290f)); //View.resizer.resizeMinWidth = 320f; //View.resizer.resizeMinHeight = 290f; }
override public void OnEnter(ChatBoxState oldState) { // 清空消息 LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_MATCHROOM); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_CAMP); View.SetActive(true); View.SetHide(false); SetActiveState(); if (oldState == ChatBoxState.StaticStateFullScreen) { return; } // 设置需要显示的频道选项对应的频道 View.m_dropDownIndexToChannel = new EMChatChannelType[] { EMChatChannelType.CHAT_CHANNEL_WORLD, EMChatChannelType.CHAT_CHANNEL_CLAN, EMChatChannelType.CHAT_CHANNEL_KIN, EMChatChannelType.CHAT_CHANNEL_TEAMMATE, EMChatChannelType.CHAT_CHANNEL_PRIVATE, EMChatChannelType.CHAT_CHANNEL_NEARBY, EMChatChannelType.CHAT_CHANNEL_ZONE, }; View.refreshChannelDropDown(); View.ChangeChannel((int)EMChatChannelType.CHAT_CHANNEL_NEARBY); View.ClearChannelMaskItem(); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_All); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Personal); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Public); View.m_DiyChannelGroupItem = View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Diy); View.m_DiyChannelGroupItem.setChannelMask(View.m_DiyChannelMask); // 默认选择全部 View.channelMaskButtonGroup.SetItemSelectedItem(0, true); View.SetChatWndViewPositionChange(ChatPositionChangeType.CPCY_MOVEDOWN); //// 设置初始大小,TODO-lyh //View.SetSize(new Vector2(420f, 235f)); //View.resizer.resizeMinWidth = 420f; //View.resizer.resizeMinHeight = 235f; }
override public void OnEnter(ChatBoxState oldState) { // 清空消息 LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_ZONE); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_NEARBY); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_TEAMMATE); View.contentView.Clear(); View.SetActive(true); View.SetHide(false); SetActiveState(); // 设置需要显示的频道选项对应的频道 View.m_dropDownIndexToChannel = new EMChatChannelType[] { EMChatChannelType.CHAT_CHANNEL_WORLD, EMChatChannelType.CHAT_CHANNEL_CLAN, EMChatChannelType.CHAT_CHANNEL_KIN, EMChatChannelType.CHAT_CHANNEL_MATCHROOM, EMChatChannelType.CHAT_CHANNEL_CAMP, EMChatChannelType.CHAT_CHANNEL_PRIVATE, }; View.refreshChannelDropDown(); View.ChangeChannel(ChatDefaultChannel.Instance.getDefaultChannelInRoom(View.m_nMatchType)); View.ClearChannelMaskItem(); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_All); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Personal); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Public); View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Room); View.m_DiyChannelGroupItem = View.AddChannelMaskItem(ChatChannelGroupType.ChatChannel_Diy); View.m_DiyChannelGroupItem.setChannelMask(View.m_DiyChannelMask); // 默认选择房间 View.channelMaskButtonGroup.SetItemSelectedItem(3, true); View.SetChatWndViewPositionChange(ChatPositionChangeType.CPCY_MOVEDOWN); // 延迟刷新聊天内容 View.DelayChatMessageUpdate(); }
override public void OnEnter(ChatBoxState oldState) { // 清空消息 LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_MATCHROOM); LogicDataCenter.chatMessageManager.RemoveChannelChatMessage(EMChatChannelType.CHAT_CHANNEL_CAMP); // 缩小聊天框 View.SetSize(new Vector2(View.m_UnActiveWidth, View.m_UnActiveHeight)); // 隐藏频道组选择框 View.channelCanvasGroup.gameObject.SetActive(false); // 隐藏最小化按钮 View.minimunCanvasGroup.gameObject.SetActive(false); if (View.IsVisible()) { View.StartCoroutine(View.showLastChatContent()); } // fps英雄鼠标操作提示位置 View.fpsSwitchHint.GetComponent <RectTransform>().anchoredPosition = new Vector2(View.fpsHintInitPosition.x, View.fpsHintInitPosition.y - View.minimumIcon.GetComponent <RectTransform>().sizeDelta.y); }
virtual public void OnEnter(ChatBoxState oldState) { }