Пример #1
0
    //框架命令提示消息
    private void OnEventTipMessage(byte[] tmpBuf, int size)
    {
        CMD_GR_PersonalTableTip tipMessage = NetUtil.BytesToStruct <CMD_GR_PersonalTableTip>(tmpBuf);

        MyDebug.Log("" + NetUtil.BytesToStruct <CMD_GF_GameOptionNew>(tmpBuf));
        if (GlobalDataScript.Instance.roomInfo == null)
        {
            GlobalDataScript.Instance.roomInfo = new GameRoomInfo();
        }
        GlobalDataScript.Instance.roomInfo.roomId           = NetUtil.BytesToString(tipMessage.szServerID);
        GlobalDataScript.Instance.roomInfo.limtNumber       = tipMessage.dwDrawCountLimit.ToString();
        GlobalDataScript.Instance.roomInfo.PlayGameCount    = (int)tipMessage.dwPlayCount;
        GlobalDataScript.Instance.roomInfo.tableOwnerUserID = tipMessage.dwTableOwnerUserID;//房主
        GlobalDataScript.Instance.roomInfo.InitScore        = tipMessage.lCellScore;
        GlobalDataScript.Instance.roomInfo.InitBeishu       = tipMessage.lIniScore;
        SocketEventHandle.Instance.SetClientResponse(APIS.SetRoomMark, null);
        MyDebug.Log("====================房主=====================" + GlobalDataScript.Instance.roomInfo.tableOwnerUserID);
        MySceneManager.instance.SceneToNiuNiu();
    }
Пример #2
0
    //结束游戏
    public void OnEventGameOver(byte[] tmpBuf, int size)
    {
        CMD_GR_PersonalTableTip tipMessage = NetUtil.BytesToStruct <CMD_GR_PersonalTableTip>(tmpBuf);

        MyDebug.Log("" + NetUtil.BytesToStruct <CMD_GR_PersonalTableTip>(tmpBuf));
    }