Commit 096110bd authored by Unicorn369's avatar Unicorn369

Update library-release.aar && Download closeup

parent 4d4fadae
...@@ -21,6 +21,8 @@ public class Menu : WindowServantSP ...@@ -21,6 +21,8 @@ public class Menu : WindowServantSP
UIHelper.registEvent(gameObject, "single_", onClickPizzle); UIHelper.registEvent(gameObject, "single_", onClickPizzle);
//UIHelper.registEvent(gameObject, "ai_", onClickAI); //UIHelper.registEvent(gameObject, "ai_", onClickAI);
UIHelper.registEvent(gameObject, "exit_", onClickExit); UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "joinQQ_", onClickJoinQQ);
UIHelper.registEvent(gameObject, "download_", onClickDownload);
//(new Thread(up)).Start(); //(new Thread(up)).Start();
} }
...@@ -126,6 +128,31 @@ public class Menu : WindowServantSP ...@@ -126,6 +128,31 @@ public class Menu : WindowServantSP
Program.I().shiftToServant(Program.I().selectDeck); Program.I().shiftToServant(Program.I().selectDeck);
} }
void onClickJoinQQ()
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
Application.OpenURL("https://jq.qq.com/?_wv=1027&k=50MZVQA");
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
jo.Call("doJoinQQGroup", "UHm3h3hSrmgp-iYqMiZcc2zO5J1Q8OyW");
#endif
}
void onClickDownload()
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip");
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if (!File.Exists("updates/closeup_version1.0.txt"))//用于检查更新
{
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip");//下载并解压
} else {
jo.Call("showToast", "已下载,无需再次下载!");
}
#endif
}
public static void deleteShell() public static void deleteShell()
{ {
try try
......
...@@ -287,7 +287,7 @@ public class Program : MonoBehaviour ...@@ -287,7 +287,7 @@ public class Program : MonoBehaviour
//YGOPro2 Paths (https://github.com/Unicorn369/YGOPro2_Droid/tree/Test) //YGOPro2 Paths (https://github.com/Unicorn369/YGOPro2_Droid/tree/Test)
//string GamePaths = "/storage/emulated/0/ygopro2/"; //string GamePaths = "/storage/emulated/0/ygopro2/";
if(!File.Exists(GamePaths + "updates/version1.0.txt")) if (!File.Exists(GamePaths + "updates/version1.0.txt"))
{ {
string filePath = Application.streamingAssetsPath + "/ygocore.zip"; string filePath = Application.streamingAssetsPath + "/ygocore.zip";
var www = new WWW(filePath); var www = new WWW(filePath);
...@@ -300,7 +300,7 @@ public class Program : MonoBehaviour ...@@ -300,7 +300,7 @@ public class Program : MonoBehaviour
System.IO.Directory.SetCurrentDirectory(GamePaths); System.IO.Directory.SetCurrentDirectory(GamePaths);
#elif UNITY_IPHONE //iPhone #elif UNITY_IPHONE //iPhone
string GamePaths = Application.persistentDataPath + "/ygopro2/"; string GamePaths = Application.persistentDataPath + "/ygopro2/";
if(!File.Exists(GamePaths + "updates/version1.0.txt")) if (!File.Exists(GamePaths + "updates/version1.0.txt"))
{ {
string filePath = Application.streamingAssetsPath + "/ygocore.zip"; string filePath = Application.streamingAssetsPath + "/ygocore.zip";
var www = new WWW(filePath); var www = new WWW(filePath);
...@@ -394,14 +394,12 @@ public class Program : MonoBehaviour ...@@ -394,14 +394,12 @@ public class Program : MonoBehaviour
#if UNITY_ANDROID //Android Java Test #if UNITY_ANDROID //Android Java Test
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API"); AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if(!File.Exists("updates/image_version1.0.txt"))//用于检查更新 if (!File.Exists("updates/image_version1.0.txt"))//用于检查更新
{ {
if(File.Exists("pics.zip"))//YGOMobile内置的卡图包 if (File.Exists("pics.zip"))//YGOMobile内置的卡图包
{ {
jo.Call("doExtractZipFile", "pics.zip", "./"); jo.Call("doExtractZipFile", "pics.zip", "./");
File.Create("updates/image_version1.0.txt"); File.Create("updates/image_version1.0.txt");
//} else {
// jo.Call("doDownloadZipFile", "http://download.ygopro.win/ygopro2/Android-Image-Data.zip");//下载并解压,完成后删除
} }
} }
#endif #endif
......
...@@ -25,6 +25,11 @@ namespace YGOSharp ...@@ -25,6 +25,11 @@ namespace YGOSharp
nullString += "\r\n「Android」\r\n[url=https://github.com/Unicorn369/YGOPro2_Droid][u]https://github.com/Unicorn369/YGOPro2_Droid[/u][/url]"; nullString += "\r\n「Android」\r\n[url=https://github.com/Unicorn369/YGOPro2_Droid][u]https://github.com/Unicorn369/YGOPro2_Droid[/u][/url]";
//nullString += "\r\nWindows:[url=https://github.com/lllyasviel/YGOProUnity_V2][u]https://github.com/lllyasviel/YGOProUnity_V2[/u][/url]"; //nullString += "\r\nWindows:[url=https://github.com/lllyasviel/YGOProUnity_V2][u]https://github.com/lllyasviel/YGOProUnity_V2[/u][/url]";
nullString += "\r\n\r\n「Windows」\r\n[url=https://github.com/mercury233/ygopro2][u]https://github.com/mercury233/ygopro2[/u][/url]"; nullString += "\r\n\r\n「Windows」\r\n[url=https://github.com/mercury233/ygopro2][u]https://github.com/mercury233/ygopro2[/u][/url]";
nullString += "\r\n\r\n\r\n";
nullString += "欢迎加入QQ群:";
nullString += "\r\n①:[url=https://jq.qq.com/?_wv=1027&k=5nq6xJe][u]649612818[/u][/url]";
nullString += "\r\n③:[url=https://jq.qq.com/?_wv=1027&k=50MZVQA][u]831010207[/u][/url]";
nullString += "\r\n②:[url=https://jq.qq.com/?_wv=1027&k=5idyod3][u]559276772[/u][/url]";
using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath)) using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath))
{ {
connection.Open(); connection.Open();
......
This diff is collapsed.
...@@ -229,7 +229,7 @@ PlayerSettings: ...@@ -229,7 +229,7 @@ PlayerSettings:
AndroidSplashScreenScale: 0 AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0} androidSplashScreen: {fileID: 0}
AndroidKeystoreName: ygopro.jks AndroidKeystoreName: ygopro.jks
AndroidKeyaliasName: AndroidKeyaliasName: ygopro
AndroidTVCompatibility: 0 AndroidTVCompatibility: 0
AndroidIsGame: 0 AndroidIsGame: 0
androidEnableBanner: 1 androidEnableBanner: 1
......
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