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(); }
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); } }
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(); }
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); } }