Пример #1
0
 private static NetMessageManage Manage(ConnectResultBlock connect)
 {
     if (_instance == null)
     {
         _instance = new NetMessageManage();
         _instance.ConnectSever();
         _instance.ConnectBlockEvent += connect;
     }
     return(_instance);
 }
Пример #2
0
 /// <summary>
 /// 连接服务器
 /// </summary>
 /// <param name="connect">连接回调</param>
 public static void ConnectServer(ConnectResultBlock connect)
 {
     if (connect != null)
     {
         NetMessageManage.Manage(connect);
     }
     else
     {
         NetMessageManage.Manage();
     }
 }
Пример #3
0
 /// <summary>
 /// 移除连接服务器结果回调
 /// </summary>
 public static void RemoveConnetServer(ConnectResultBlock result)
 {
     NetMessageManage.Manage().ConnectBlockEvent -= result;
 }