private void EnterGameReq() { Account_EnterGameReqProto proto = new Account_EnterGameReqProto(); proto.RoleId = mCurrentSelectedRoleId; SocketManager.Instance.SendMessageToLocalServer(proto.ToArray()); }
private void OnEnterGame(byte[] buffer) { Account_EnterGameReqProto proto = Account_EnterGameReqProto.GetProto(buffer); int roleID = proto.RoleId; EnterGameServerResp(); }
public static Account_EnterGameReqProto GetProto(byte[] buffer) { Account_EnterGameReqProto proto = new Account_EnterGameReqProto(); using (MemoryStreamUtil ms = new MemoryStreamUtil(buffer)) { proto.RoleId = ms.ReadInt(); proto.ChannelId = ms.ReadInt(); } return(proto); }