Exemplo n.º 1
0
    public void StartHeartBeat()
    {
        if (IsConnect == false)
        {
            return;
        }

        heartBeat           = NGUITools.AddChild <GHeartBeat>(SceneManager.instance.cacheRoot.gameObject);
        heartBeat.Interval  = 6f;
        heartBeat.frequency = 5;
        heartBeat.net       = this;
        heartBeat.Start();
    }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.disposed)
     {
         return;
     }
     if (disposing)
     {
         myClient.Close();
         this.disposed = true;
         if (heartBeat != null)
         {
             heartBeat.Stop();
             heartBeat = null;
         }
         eventManager.InvokeOnEvent(EVENT_DISCONNECT, null);
     }
 }
Exemplo n.º 3
0
    public void StartHeartBeat()
    {
        if (IsConnect == false)
            return;

        heartBeat = NGUITools.AddChild<GHeartBeat>(SceneManager.instance.cacheRoot.gameObject);
        heartBeat.Interval = 6f;
        heartBeat.frequency = 5;
        heartBeat.net = this;
        heartBeat.Start();
    }
Exemplo n.º 4
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.disposed)
         return;
     if (disposing)
     {
         myClient.Close();
         this.disposed = true;
         if (heartBeat != null)
         {
             heartBeat.Stop();
             heartBeat = null;
         }
         eventManager.InvokeOnEvent(EVENT_DISCONNECT, null);
     }
 }