Example #1
0
 public void Init()
 {
     if (File.Exists(Application.persistentDataPath + "/LivesLivesLog.txt"))
     {
         Application.logMessageReceived += LogCallback;
         using (StreamReader sr = new StreamReader(Application.persistentDataPath + "/LivesLivesLog.txt"))
         {
             string tmpIp = sr.ReadLine();
             tmpIp = tmpIp.Trim();
             NetWork.GetSingleton().Connect(tmpIp, 12312);
         }
     }
     else
     {
         Debug.LogError(Application.persistentDataPath + "/LivesLivesLog.txt Not Exist");
     }
 }
Example #2
0
 void OnDestroy()
 {
     NetWork.GetSingleton().DisConnect();
 }
Example #3
0
 private static void LogCallback(string condition, string stackTrace, LogType type)
 {
     NetWork.GetSingleton().Send(type + System.Environment.NewLine + condition + System.Environment.NewLine + stackTrace);
 }