コード例 #1
0
ファイル: WarDeathReplayWnd.cs プロジェクト: zwong91/Titan
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_COMMON_BATTLESTATE_ENTER:
            {
                LoadView();
                if (m_wndView != null)
                {
                    m_wndView.ShowTitleFrame(false);
                }
            }
            break;

            case WndMsgID.WND_MSG_WAR_DEATHREPLAY_SHOW:
            {
                if (m_wndView != null)
                {
                    m_wndView.ShowTitleFrame(true);
                    m_wndView.LoadDamageInfo();
                }
            }
            break;

            case WndMsgID.WND_MSG_WAR_DEATHREPLAY_SHOWMURDERINFO:
            {
                if (m_wndView != null)
                {
                    DeathReplayMurderData murderData = data as DeathReplayMurderData;
                    m_wndView.ShowMurderInfo(murderData);
                }
            }
            break;

            case WndMsgID.WND_MSG_WAR_DEATHREPLAY_CLOSE:
            {
                if (m_wndView != null)
                {
                    m_wndView.ShowTitleFrame(false);
                    m_wndView.UnLoadDamageInfo();
                }
            }
            break;

            case WndMsgID.WND_MSG_COMMON_BATTLESTATE_LEAVE:
            case WndMsgID.WND_MSG_WAR_DEATHREPLAY_UNLOAD:
            case WndMsgID.WND_MSG_COMMON_WAREND:
            {
                UnloadView();
            }
            break;

            default:
                break;
            }
        }
コード例 #2
0
ファイル: WarDeathReplayWnd.cs プロジェクト: zwong91/Titan
 public void ShowMurderInfo(DeathReplayMurderData data)
 {
     if (data.bShowMurderInfo)
     {
         m_MurderIcon.sprite = m_DeathReplayDataList[(int)data.murderType].headIcon.sprite;
         if (data.murderType == MurderType.MurderType_Murder)
         {
             m_MurderType.text = szMurderDesc;
             if (null != murderData)
             {
                 string desc = murderData.heroDesc;
                 UBB.toHtml(ref desc);
                 m_MurderDesc.text = desc;
             }
         }
         else
         {
             m_MurderType.text = szAssistsDesc;
             if (DamageDataList.Count >= (int)data.murderType)
             {
                 string desc = DamageDataList[(int)data.murderType - 1].heroDesc;
                 UBB.toHtml(ref desc);
                 m_MurderDesc.text = desc;
             }
         }
         m_MurderInfoFrame.gameObject.SetActive(true);
         m_TipsInfoFrame.gameObject.SetActive(false);
     }
     else
     {
         m_MurderIcon.sprite = USpriteManager.Instance.DefaultSprite;
         m_MurderType.text   = "";
         m_MurderDesc.text   = "";
         m_MurderInfoFrame.gameObject.SetActive(false);
         m_TipsInfoFrame.gameObject.SetActive(true);
     }
 }
コード例 #3
0
ファイル: WarDeathReplayWnd.cs プロジェクト: zwong91/Titan
        public virtual void OnPointerExit(PointerEventData eventData)
        {
            DeathReplayMurderData data = new DeathReplayMurderData(m_MurderType, false);

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_WAR_DEATHREPLAY_SHOWMURDERINFO, data);
        }