/// <summary> /// 点击关卡失败复活主城按钮 /// </summary> private void OnClickGameLevelFailViewResurrectionButton() { GameLevel_ResurgenceProto proto = new GameLevel_ResurgenceProto(); proto.GameLevelId = m_GameLevelSceneId; proto.Grade = (byte)m_Garade; NetWorkSocket.Instance.SendMsg(proto.ToArray()); m_GameLevelFailView.Close(); }
public static GameLevel_ResurgenceProto ToProto(byte[] buffer) { using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { GameLevel_ResurgenceProto proto = new GameLevel_ResurgenceProto(); proto.GameLevelId = ms.ReadInt(); proto.Grade = (byte)ms.ReadByte(); return(proto); } }
public static GameLevel_ResurgenceProto GetProto(MMO_MemoryStream ms, byte[] buffer) { GameLevel_ResurgenceProto proto = new GameLevel_ResurgenceProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.GameLevelId = ms.ReadInt(); proto.Grade = (byte)ms.ReadByte(); proto.Type = (byte)ms.ReadByte(); return(proto); }