Commit 1308d2de authored by Unicorn369's avatar Unicorn369

update

parent d00f6710
This diff is collapsed.
...@@ -144,16 +144,17 @@ public class Menu : WindowServantSP ...@@ -144,16 +144,17 @@ public class Menu : WindowServantSP
Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/tag/1.0"); Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/tag/1.0");
#elif UNITY_ANDROID //Android #elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API"); AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if (!File.Exists("updates/closeup_version1.2.txt")) {//用于检查更新 if (!File.Exists("updates/closeup_version1.3.txt")) {//用于检查更新
if (File.Exists("closeup_version1.2.zip")) {//如果有则直接解压 if (File.Exists("closeup_version1.3.zip")) {//如果有则直接解压
jo.Call("doExtractZipFile", "closeup_version1.2.zip", Program.ANDROID_GAME_PATH); jo.Call("doExtractZipFile", "closeup_version1.3.zip", Program.ANDROID_GAME_PATH);
} else if (File.Exists("updates/closeup_version1.1.txt")){//如果有则下载更新包 } else if (File.Exists("updates/closeup_version1.2.txt")){//如果有则下载更新包
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.2.zip"); jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.3.zip");
} else {//否则下载并解压,锁定目录:ANDROID_GAME_PATH } else {//否则下载并解压,锁定目录:ANDROID_GAME_PATH
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.2.zip"); jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.3.zip");
} }
} else { } else {
jo.Call("showToast", "已下载,无需再次下载!"); jo.Call("showToast", "已是最新,无需再次下载!");
Program.PrintToChat(InterString.Get("已是最新,无需再次下载!"));
} }
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment