public static void CreateInstance(string url, NpCloudSocketType type, string hashKey) { if (NpCloudSocketSystem.instance != null) { return; } NpCloudSocketSystem.instance = new NpCloudSocketSystem(url, type, hashKey); }
public static void DeleteInstance(Action exitAction) { if (NpCloudSocketSystem.instance != null) { NpCloudSocketSystem.instance.mSocketSystem.Exit(0, exitAction); NpCloudSocketSystem.instance.mSocketSystem.DeleteInstance(); NpCloudSocketSystem.instance.mSocketSystem = null; } else { exitAction(); } NpCloudSocketSystem.instance = null; }