Ejemplo n.º 1
0
 /// <summary>
 /// 打开结束界面
 /// </summary>
 private void OpenResultView()
 {
     if (m_GuPaiJiuResult == null)
     {
         return;
     }
     UIViewUtil.Instance.LoadWindowAsync(UIWindowType.GuPaiJiuResult, (GameObject go) =>
     {
         m_UIGuPaiJiuResultView = go.GetComponent <UIGuPaiJiuResultView>();
         m_UIGuPaiJiuResultView.SetUI(m_GuPaiJiuResult);
         m_GuPaiJiuResult = null;
     });
 }
Ejemplo n.º 2
0
    /// <summary>
    /// 服务器广播游戏结束
    /// </summary>
    private void OnServerBroadcastGameOver(byte[] obj)
    {
        GP_ROOM_GAMEOVER proto = GP_ROOM_GAMEOVER.decode(obj);

        if (!proto.hasRoom())
        {
            ExitGame();
            return;
        }
        UIViewUtil.Instance.LoadWindowAsync(UIWindowType.GuPaiJiuResult, (GameObject go) =>
        {
            m_UIGuPaiJiuResultView = go.GetComponent <UIGuPaiJiuResultView>();
            m_UIGuPaiJiuResultView.SetUI(proto);
            m_GuPaiJiuResult = null;
        });
    }