Beispiel #1
0
 public static GameLevel_FailProto ToProto(byte[] buffer)
 {
     using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer))
     {
         GameLevel_FailProto proto = new GameLevel_FailProto();
         proto.GameLevelId = ms.ReadInt();
         proto.Grade       = (byte)ms.ReadByte();
         return(proto);
     }
 }
Beispiel #2
0
    /// <summary>
    /// 打开关卡失败页面
    /// </summary>
    private void OpenGameLevelFail()
    {
        m_GameLevelFailView = UIViewUtil.Instance.OpenWindow(UIViewType.GameLevelFail).GetComponent <UIGameLevelFailView>();
        m_GameLevelFailView.OnbtnResurrection     = OnClickGameLevelFailViewResurrectionButton;
        m_GameLevelFailView.OnbtnReturnWroldScene = OnClickGameLevelFailViewReturnWorldSceneButton;
        GameLevel_FailProto proto = new GameLevel_FailProto();

        proto.GameLevelId = m_GameLevelSceneId;
        proto.Grade       = (byte)m_Garade;
        NetWorkSocket.Instance.SendMsg(proto.ToArray());
    }
Beispiel #3
0
    public static GameLevel_FailProto GetProto(MMO_MemoryStream ms, byte[] buffer)
    {
        GameLevel_FailProto proto = new GameLevel_FailProto();

        ms.SetLength(0);
        ms.Write(buffer, 0, buffer.Length);
        ms.Position = 0;

        proto.GameLevelId = ms.ReadInt();
        proto.Grade       = (byte)ms.ReadByte();

        return(proto);
    }