示例#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");
     }
 }
示例#2
0
 void OnDestroy()
 {
     NetWork.GetSingleton().DisConnect();
 }
示例#3
0
 private static void LogCallback(string condition, string stackTrace, LogType type)
 {
     NetWork.GetSingleton().Send(type + System.Environment.NewLine + condition + System.Environment.NewLine + stackTrace);
 }