Exemple #1
0
    private void GameLevel_VictroyReturnProtoCallBack(byte[] p)
    {
        GameLevel_VictoryReturnProto proto = GameLevel_VictoryReturnProto.ToProto(p);

        if (proto.IsSucess)
        {
            Debug.Log("GameLevel_VictoryReturnProto IsSucess");
        }
    }
Exemple #2
0
 public static GameLevel_VictoryReturnProto ToProto(byte[] buffer)
 {
     using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer))
     {
         GameLevel_VictoryReturnProto proto = new GameLevel_VictoryReturnProto();
         proto.IsSucess = ms.ReadBool();
         return(proto);
     }
 }
Exemple #3
0
    public static GameLevel_VictoryReturnProto GetProto(byte[] buffer)
    {
        GameLevel_VictoryReturnProto proto = new GameLevel_VictoryReturnProto();

        using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer))
        {
            proto.IsSuccess = ms.ReadBool();
            if (!proto.IsSuccess)
            {
                proto.MsgCode = ms.ReadInt();
            }
        }
        return(proto);
    }
    public static GameLevel_VictoryReturnProto GetProto(MMO_MemoryStream ms, byte[] buffer)
    {
        GameLevel_VictoryReturnProto proto = new GameLevel_VictoryReturnProto();

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

        proto.IsSuccess = ms.ReadBool();
        if (!proto.IsSuccess)
        {
            proto.MsgCode = ms.ReadInt();
        }

        return(proto);
    }