public static NetMsgMng CreateNew(string server, int port) { if (GameCenter.netMsgMng == null) { NetMsgMng netMsgMng = new NetMsgMng(); netMsgMng.Init(server, port); return(netMsgMng); } else { GameCenter.netMsgMng.UnRegist(); return(GameCenter.netMsgMng); } }