private void StartRolling(CUIAutoScroller autoScroller) { if (((autoScroller != null) && !autoScroller.IsScrollRunning()) && (Singleton <LobbyLogic> .GetInstance().CanShowRolling&& !this.m_isInRollingCD)) { RectTransform transform = autoScroller.transform as RectTransform; if (transform != null) { if (Singleton <CLoudSpeakerSys> .instance.IsLoudSpeakerShowing()) { transform.anchorMin = new Vector2(0.661f, 0.5f); } else { transform.anchorMin = new Vector2(0.3f, 0.5f); } } int nextShowRollingInfoIndex = this.GetNextShowRollingInfoIndex(); if ((0 <= nextShowRollingInfoIndex) && (nextShowRollingInfoIndex < this.m_rollingInfos.Count)) { autoScroller.SetText(this.m_rollingInfos[nextShowRollingInfoIndex].content); autoScroller.StartAutoScroll(false); this.m_rollingInfos[nextShowRollingInfoIndex].isShowing = true; } } }
public void ShowLoudSpeaker(COMDT_CHAT_MSG_HORN data) { this.m_loudSpeakerCount = 0; this.m_timerLoudSpeaker = Singleton <CTimerManager> .instance.AddTimer(0x3e8, 0, new CTimer.OnTimeUpHandler(this.OnTimerLoudSpeaker)); if (Singleton <BattleLogic> .instance.isRuning) { this.loudSpeakerList.Clear(); } else { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(LobbyForm.FORM_PATH); if (form != null) { CUIAutoScroller component = form.GetWidget(5).GetComponent <CUIAutoScroller>(); if (component != null) { GameObject widget = form.GetWidget(6); if (widget != null) { string rawText = UT.Bytes2String(data.szContent); string str = CChatUT.Build_4_LoudSpeaker_EntryString(data.stFrom.ullUid, (uint)data.stFrom.iLogicWorldID, rawText); component.SetText(CUIUtility.RemoveEmoji(str)); component.gameObject.CustomSetActive(true); widget.CustomSetActive(true); component.StopAutoScroll(); component.StartAutoScroll(true); } } } } }
private void StartRolling(CUIAutoScroller autoScroller) { if (autoScroller == null || autoScroller.IsScrollRunning() || !Singleton <LobbyLogic> .GetInstance().CanShowRolling || this.m_isInRollingCD) { return; } RectTransform rectTransform = autoScroller.transform as RectTransform; if (rectTransform != null) { if (Singleton <CLoudSpeakerSys> .get_instance().IsLoudSpeakerShowing()) { rectTransform.anchorMin = new Vector2(0.661f, 0.5f); } else { rectTransform.anchorMin = new Vector2(0.3f, 0.5f); } } int nextShowRollingInfoIndex = this.GetNextShowRollingInfoIndex(); if (0 <= nextShowRollingInfoIndex && nextShowRollingInfoIndex < this.m_rollingInfos.get_Count()) { autoScroller.SetText(this.m_rollingInfos.get_Item(nextShowRollingInfoIndex).content); autoScroller.StartAutoScroll(false); this.m_rollingInfos.get_Item(nextShowRollingInfoIndex).isShowing = true; } }
public void StopRolling() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form == null) { return; } CUIAutoScroller component = form.GetWidget(4).GetComponent <CUIAutoScroller>(); component.StopAutoScroll(); }
private void StartRolling(CUIAutoScroller autoScroller) { if (((autoScroller != null) && !autoScroller.IsScrollRunning()) && (Singleton <LobbyLogic> .GetInstance().CanShowRolling&& !this.m_isInRollingCD)) { int nextShowRollingInfoIndex = this.GetNextShowRollingInfoIndex(); if ((0 <= nextShowRollingInfoIndex) && (nextShowRollingInfoIndex < this.m_rollingInfos.Count)) { autoScroller.SetText(this.m_rollingInfos[nextShowRollingInfoIndex].content); autoScroller.StartAutoScroll(false); this.m_rollingInfos[nextShowRollingInfoIndex].isShowing = true; } } }
public void StartRolling() { if (!this.m_isInRollingCD) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(LobbyForm.FORM_PATH); if (form != null) { CUIAutoScroller component = form.GetWidget(4).GetComponent <CUIAutoScroller>(); this.StartRolling(component); } } }
public void StartRolling() { if (this.m_isInRollingCD) { return; } CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form == null) { return; } CUIAutoScroller component = form.GetWidget(4).GetComponent <CUIAutoScroller>(); this.StartRolling(component); }
private void StartRolling(CUIAutoScroller autoScroller) { if (autoScroller == null || autoScroller.IsScrollRunning() || !Singleton <LobbyLogic> .GetInstance().CanShowRolling || this.m_isInRollingCD) { return; } RectTransform rectTransform = autoScroller.transform as RectTransform; if (rectTransform != null) { if (Singleton <CLoudSpeakerSys> .instance.IsLoudSpeakerShowing()) { rectTransform.anchorMin = new Vector2(0.661f, 0.5f); } else { rectTransform.anchorMin = new Vector2(0.3f, 0.5f); } } int nextShowRollingInfoIndex = this.GetNextShowRollingInfoIndex(); if (0 <= nextShowRollingInfoIndex && nextShowRollingInfoIndex < this.m_rollingInfos.get_Count()) { RollingInfo rollingInfo = this.m_rollingInfos.get_Item(nextShowRollingInfoIndex); autoScroller.SetText(rollingInfo.content); if (autoScroller.m_content != null) { CUIEventScript component = autoScroller.m_content.GetComponent <CUIEventScript>(); if (component != null) { if (!string.IsNullOrEmpty(rollingInfo.url)) { component.m_onClickEventParams.tagStr = rollingInfo.url; } else { component.m_onClickEventParams.tagStr = string.Empty; } } } autoScroller.StartAutoScroll(false); rollingInfo.isShowing = true; } }
private void OnTimerLoudSpeaker(int timerSequence) { if ((long)CRoleInfo.GetCurrentUTCTime() >= (long)((ulong)this.GetSpeakerEndTime(1))) { Singleton <CTimerManager> .get_instance().RemoveTimer(timerSequence); this.m_timerLoudSpeaker = -1; this.CurLoudSpeaker = null; CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form == null) { return; } CUIAutoScroller component = form.GetWidget(5).GetComponent <CUIAutoScroller>(); if (component == null) { return; } GameObject widget = form.GetWidget(6); if (widget == null) { return; } component.StopAutoScroll(); if (Singleton <CChatController> .get_instance().view != null) { Singleton <CChatController> .get_instance().view.ShowLoudSpeaker(false, null); } this.CurLoudSpeaker = this.PopSpeakerList(1); if (this.CurLoudSpeaker == null) { component.gameObject.CustomSetActive(false); widget.CustomSetActive(false); this.GetSpeakerMsg(1, this.m_lastLoudSpeakerBeginSec); } else { component.gameObject.CustomSetActive(true); widget.CustomSetActive(true); this.ShowLoudSpeaker(this.CurLoudSpeaker); } } }
private void OnTimerLoudSpeaker(int timerSequence) { if (CRoleInfo.GetCurrentUTCTime() >= this.GetSpeakerEndTime(CS_HORN_TYPE.CS_HORNTYPE_BIGER)) { Singleton <CTimerManager> .instance.RemoveTimer(timerSequence); this.m_timerLoudSpeaker = -1; this.CurLoudSpeaker = null; CUIFormScript form = Singleton <CUIManager> .instance.GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form != null) { CUIAutoScroller component = form.GetWidget(5).GetComponent <CUIAutoScroller>(); if (component != null) { GameObject widget = form.GetWidget(6); if (widget != null) { component.StopAutoScroll(); if (Singleton <CChatController> .instance.view != null) { Singleton <CChatController> .instance.view.ShowLoudSpeaker(false, null); } this.CurLoudSpeaker = this.PopSpeakerList(CS_HORN_TYPE.CS_HORNTYPE_BIGER); if (this.CurLoudSpeaker == null) { component.gameObject.CustomSetActive(false); widget.CustomSetActive(false); this.GetSpeakerMsg(CS_HORN_TYPE.CS_HORNTYPE_BIGER, this.m_lastLoudSpeakerBeginSec); } else { component.gameObject.CustomSetActive(true); widget.CustomSetActive(true); this.ShowLoudSpeaker(this.CurLoudSpeaker); } } } } } }
private void OnTimerLoudSpeaker(int timerSequence) { this.m_loudSpeakerCount++; if (this.m_loudSpeakerCount >= GetSpeakerVaildTime(CS_HORN_TYPE.CS_HORNTYPE_BIGER)) { Singleton <CTimerManager> .instance.RemoveTimer(timerSequence); this.m_timerLoudSpeaker = -1; this.m_loudSpeakerCount = 0; COMDT_CHAT_MSG_HORN data = this.PopSpeakerList(CS_HORN_TYPE.CS_HORNTYPE_BIGER); CUIFormScript form = Singleton <CUIManager> .instance.GetForm(LobbyForm.FORM_PATH); if (form != null) { CUIAutoScroller component = form.GetWidget(5).GetComponent <CUIAutoScroller>(); if (component != null) { GameObject widget = form.GetWidget(6); if (widget != null) { component.StopAutoScroll(); if (data == null) { component.gameObject.CustomSetActive(false); widget.CustomSetActive(false); this.GetSpeakerMsg(CS_HORN_TYPE.CS_HORNTYPE_BIGER, this.m_loudSpeakerIndex); } else { component.gameObject.CustomSetActive(true); widget.CustomSetActive(true); this.ShowLoudSpeaker(data); } } } } } }