Exemplo n.º 1
0
 public static void LoginOut()
 {
     NetEventDispatch.Clear();
     NetWork.ClosePing();
     NetWork.ClearQueue();
     NetWork.ConnectGate();
 }
Exemplo n.º 2
0
    public static void In(string account, string password, System.Action <bool> f)
    {
        string accountHash  = Md5.GetMd5Hash(account);
        string passwrodHash = Md5.GetMd5Hash(password);

        NetEventDispatch.RegisterEvent("register", data => { Registered(data, f); });
        Dictionary <string, object> dic = NetWork.getSendStart();

        dic.Add("account", accountHash);
        dic.Add("password", passwrodHash);
        dic.Add("name", "register");
        NetWork.Push(dic);
    }
Exemplo n.º 3
0
 void Update()
 {
     NetWork.Update();
     NetEventDispatch.Update();
 }
Exemplo n.º 4
0
 public static void ClosePing()
 {
     NetWork.heartbeat = false;
     NetEventDispatch.UnRegisterEvent("ping");
 }
Exemplo n.º 5
0
 public static void StartPing()
 {
     NetWork.heartbeat = true;
     NetEventDispatch.RegisterEvent("ping", data => { Pinged(data); });
 }