private void OnDestroy() { StopAllCoroutines(); Close(); sb = null; Instance = null; }
protected void Init(string server, int port) { netCenter = new NetCenter(); netCenter.init(server, port); msgHander = new MsgHander(); msgHander.Init(); screen_Debug_Log_C2S = GameCenter.instance.screen_Debug_Log_C2S; editor_Debug_Log_C2S = GameCenter.instance.editor_Debug_Log_C2S; }
public static void ReCreateNetCenter(string _ip, int _port) { if (netCenter != null) { netCenter.UnRegist(); netCenter.close(); } netCenter = null; netCenter = new NetCenter(); netCenter.init(_ip, _port); }
private void Awake() { Instance = this; }