Commit 2ce56115 authored by Unicorn369's avatar Unicorn369

Merge branch 'Test' of https://github.com/Unicorn369/YGOPro2_Droid into Android

parents ca458078 90e2cdc3
......@@ -13,7 +13,6 @@ ExportedObj/
.consulo/
*.csproj
*.unityproj
Library_
*.sln
*.suo
*.tmp
......@@ -49,6 +48,7 @@ deck/
expansions/
pack/
picture/
puzzle/
replay/
sound/
texture/
......@@ -62,4 +62,5 @@ commamd.shell
AI_core_vs2017solution/core.VC.db
AI_core_vs2017solution/core.VC.VC.opendb
AI_core_vs2017solution/System.Servicemodel.Faltexception.dll
[Ll]ibrary_/
Assets/StreamingAssets/update.zip*
using UnityEngine;
using System.IO;
public class AppLanguage
{
public static string CN = "/zh-CN"; //简体中文(中国) ChineseSimplified
public static string TW = "/zh-TW"; //繁体中文(台湾) ChineseTraditional
public static string Chinese = "/Chinese"; //汉语
public static string US = "/en-US"; //英语(美国) English
public static string FR = "/fr-FR"; //法语(法国) French
public static string DE = "/de-DE"; //德语(德国) German
public static string IT = "/it-IT"; //意大利语(意大利) Italian
public static string JP = "/ja-JP"; //日语(日本) Japanese
public static string KR = "/ko-KR"; //韩语(韩国) Korean
public static string ES = "/es-ES"; //西班牙语(西班牙) Spanish
//public static string Null = ""; //Unknown
public static string Null = "/en-US"; //English
public static string LanguageDir()
{
if (Application.systemLanguage == SystemLanguage.ChineseSimplified) { //可能无法识别
if (Directory.Exists("cdb/zh-CN") && Directory.Exists("config/zh-CN")) {
return CN; //中文简体
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.ChineseTraditional) {//可能无法识别
if (Directory.Exists("cdb/zh-TW") && Directory.Exists("config/zh-TW")) {
return TW; //中文繁體
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Chinese) {
if (Directory.Exists("cdb/Chinese") && Directory.Exists("config/Chinese")) {
return Chinese; //汉语
} else if (Directory.Exists("cdb/zh-CN") && Directory.Exists("config/zh-CN")) {
return CN; //中文简体
} else if (Directory.Exists("cdb/zh-TW") && Directory.Exists("config/zh-TW")) {
return TW; //中文繁體
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.English) {
if (Directory.Exists("cdb/en-US") && Directory.Exists("config/en-US")) {
return US; //English
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.French) {
if (Directory.Exists("cdb/fr-FR") && Directory.Exists("config/fr-FR")) {
return FR; //Français
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.German) {
if (Directory.Exists("cdb/de-DE") && Directory.Exists("config/de-DE")) {
return DE; //Deutsch
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Italian) {
if (Directory.Exists("cdb/it-IT") && Directory.Exists("config/it-IT")) {
return IT; //Italiano
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Japanese) {
if (Directory.Exists("cdb/ja-JP") && Directory.Exists("config/ja-JP")) {
return JP; //日本語
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Korean) {
if (Directory.Exists("cdb/ko-KR") && Directory.Exists("config/ko-KR")) {
return KR; //한국어
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Spanish) {
if (Directory.Exists("cdb/es-ES") && Directory.Exists("config/es-ES")) {
return ES; //Español
} else {
return Null;
}
} else {
return Null;
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 4778973ded4d5c445b9ca998391a2c29
timeCreated: 1538811664
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -145,16 +145,16 @@ public class Menu : WindowServantSP
void onClickDownload()
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/tag/1.0");
Application.OpenURL("https://github.com/Unicorn369/closeup_mobile/releases/tag/0.1");
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if (!File.Exists("updates/closeup_version1.4.txt")) {//用于检查更新
if (File.Exists("closeup_version1.4.zip")) {//如果有则直接解压
jo.Call("doExtractZipFile", "closeup_version1.4.zip", Program.ANDROID_GAME_PATH);
} else if (File.Exists("updates/closeup_version1.3.txt")){//如果有则下载更新包
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.4.zip");
if (!File.Exists("updates/closeup_0.1.txt")) {//用于检查更新
if (File.Exists("closeup_0.1.zip")) {//如果有则直接解压
jo.Call("doExtractZipFile", "closeup_0.1.zip", Program.ANDROID_GAME_PATH);
} else if (File.Exists("updates/closeup_0.1.txt")){//如果有则下载更新包
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/closeup_0.1.zip");
} else {//否则下载并解压,锁定目录:ANDROID_GAME_PATH
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.4.zip");
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/closeup_0.1.zip");
}
} else {
jo.Call("showToast", "已是最新,无需再次下载!");
......
......@@ -301,7 +301,7 @@ public class Program : MonoBehaviour
*/
ANDROID_GAME_PATH = jo.Call<string>("GamePath", "/ygocore/");
if (!File.Exists(ANDROID_GAME_PATH + "updates/version2.3.txt"))
if (!File.Exists(ANDROID_GAME_PATH + "updates/ver_1.034.9.txt"))
{
string filePath = Application.streamingAssetsPath + "/ygopro2-data.zip";
var www = new WWW(filePath);
......@@ -321,7 +321,7 @@ public class Program : MonoBehaviour
ExtractZipFile(bytes, ANDROID_GAME_PATH);
}
/* //选择性更新(用于额外打补丁)
if (!File.Exists(ANDROID_GAME_PATH + "updates/version2.3.2.txt"))
if (!File.Exists(ANDROID_GAME_PATH + "updates/ver_1.034.9-fix1.txt"))
{
string filePath = Application.streamingAssetsPath + "/update.zip";
var www = new WWW(filePath);
......@@ -405,13 +405,13 @@ public class Program : MonoBehaviour
loadResources();
#if !UNITY_EDITOR && UNITY_ANDROID //Android Java Test
if (!File.Exists("updates/image_version1.3.txt"))//用于检查更新
if (!File.Exists("updates/image_0.1.txt"))//用于检查更新
{
if (File.Exists("pics.zip")) {
jo.Call("doExtractZipFile", "pics.zip", ANDROID_GAME_PATH);
File.Copy("updates/version2.3.txt", "updates/image_version1.3.txt", true);
File.Copy("updates/ver_1.034.9.txt", "updates/image_0.1.txt", true);
} else {
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/pics.zip");
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/closeup_mobile/releases/download/0.1/pics.zip");
}
}
......@@ -1019,7 +1019,9 @@ public class Program : MonoBehaviour
_padScroll = 0;
}
GUI.Label(new Rect(10, 5, 200, 200), "[Ver 2.3.2] " + "FPS: " + m_FPS);
string FPS = m_FPS.ToString();
try { FPS = FPS.Substring(0, 5); } catch{}
GUI.Label(new Rect(10, 5, 200, 200), "[Ver 1.034.9] " + "FPS: " + FPS);
}
void Update()
......
......@@ -827,6 +827,18 @@ public class GameTextureManager
df.Download("http://download.ygo2019.xyz/ygopro2-data/expansions/pics/" + pic.code.ToString() + ".jpg", "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg");
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
}
LoadCardPicture(pic, path);
}
catch (Exception e)
{
Debug.Log("e 2" + e.ToString());
}
}
private static void LoadCardPicture(PictureResource pic, string path)
{
try
{
if (!File.Exists(path))
{
if (pic.code > 0)
......
......@@ -756,6 +756,7 @@ public class Servant
UIHelper.InterGameObject(currentMSwindow);
UIHelper.trySetLableText(currentMSwindow, "hint_", hint);
UIHelper.registEvent(currentMSwindow, "input_", ES_RMSpremono, null, "yes_");
UIHelper.registEvent(currentMSwindow, "exit_", ES_RMSpremono, new messageSystemValue());
UIHelper.getByName<UIInput>(currentMSwindow, "input_").value = default_;
Program.go(100, () => { UIHelper.getByName<UIInput>(currentMSwindow, "input_").isSelected = true; });
}
......@@ -801,7 +802,7 @@ public class Servant
string face = "textures/face/" + nameFace + ".jpg";
//开始下载
HttpDldFile df = new HttpDldFile();
if (inputUrl.value.Substring(0, 4) == "http")
if (inputUrl.value.Length >= 4 && inputUrl.value.Substring(0, 4) == "http")
{
url = inputUrl.value;
df.Download(url, face); //使用自定义Url
......
......@@ -159,12 +159,12 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 185494}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3, y: 40.8, z: 0}
m_LocalPosition: {x: -3, y: 30, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 467964}
m_Father: {fileID: 430068}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &417068
Transform:
......@@ -173,7 +173,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 169056}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -355, y: -135, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 481870}
......@@ -195,6 +195,7 @@ Transform:
- {fileID: 456270}
- {fileID: 467190}
- {fileID: 454160}
- {fileID: 4508122029076288}
- {fileID: 401994}
m_Father: {fileID: 417068}
m_RootOrder: 1
......@@ -245,7 +246,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 171832}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -166, y: 7, z: 0}
m_LocalPosition: {x: -166, y: 8, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 401994}
......@@ -905,3 +906,163 @@ Prefab:
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 169056}
m_IsPrefabParent: 1
--- !u!1 &1534360114270112
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4508122029076288}
- component: {fileID: 65973495383826234}
- component: {fileID: 114854050376045720}
- component: {fileID: 111046173475100260}
- component: {fileID: 114712651790018024}
- component: {fileID: 114287065172711596}
m_Layer: 5
m_Name: exit_
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4508122029076288
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1534360114270112}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 225, y: 130, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 430068}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &65973495383826234
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1534360114270112}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 20, y: 20, z: 0}
m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &111046173475100260
Animation:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1534360114270112}
m_Enabled: 0
serializedVersion: 3
m_Animation: {fileID: 7400000, guid: e8c465e83c3e18040884ef096f01647b, type: 2}
m_Animations:
- {fileID: 7400000, guid: e8c465e83c3e18040884ef096f01647b, type: 2}
m_WrapMode: 0
m_PlayAutomatically: 1
m_AnimatePhysics: 0
m_CullingType: 0
--- !u!114 &114287065172711596
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1534360114270112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1b3dc54f924693f41b5cbecb267e647a, type: 3}
m_Name:
m_EditorClassIdentifier:
leftAnchor:
target: {fileID: 0}
relative: 1
absolute: -39
rightAnchor:
target: {fileID: 0}
relative: 1
absolute: -19
bottomAnchor:
target: {fileID: 0}
relative: 1
absolute: -47
topAnchor:
target: {fileID: 0}
relative: 1
absolute: -27
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 20
mHeight: 20
mDepth: 1
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 1
mType: 0
mFillDirection: 4
mFillAmount: 1
mInvert: 0
mFlip: 0
centerType: 1
leftType: 1
rightType: 1
bottomType: 1
topType: 1
mAtlas: {fileID: 11422656, guid: 1b5c469d95cc74b4e9f655da6f9dd392, type: 2}
mSpriteName: close
mFillCenter: 1
--- !u!114 &114712651790018024
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1534360114270112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3f093ad5830afe44aba6efa8b8a5d5b9, type: 3}
m_Name:
m_EditorClassIdentifier:
target: {fileID: 111046173475100260}
animator: {fileID: 0}
clipName:
trigger: 1
playDirection: 1
resetOnPlay: 0
clearSelection: 0
ifDisabledOnPlay: 0
disableWhenFinished: 0
onFinished: []
eventReceiver: {fileID: 0}
callWhenFinished:
--- !u!114 &114854050376045720
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1534360114270112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1fdca5042b1d12a4890ec1bd4f04290d, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenTarget: {fileID: 1534360114270112}
hover: {r: 1, g: 1, b: 1, a: 1}
pressed: {r: 1, g: 1, b: 1, a: 1}
disabledColor: {r: 1, g: 1, b: 1, a: 1}
duration: 0.2
dragHighlight: 0
hoverSprite:
pressedSprite:
disabledSprite:
hoverSprite2D: {fileID: 0}
pressedSprite2D: {fileID: 0}
disabledSprite2D: {fileID: 0}
pixelSnap: 0
onClick: []
mTextureOutNormal:
mTextureOutPressed:
......@@ -123,7 +123,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 2.3.2 (1.034.9)
bundleVersion: 1.034.9
preloadedAssets: []
metroInputSource: 0
m_HolographicPauseOnTrackingLoss: 1
......@@ -148,7 +148,7 @@ PlayerSettings:
tvOS: cn.ygopro2.ygopro2android
buildNumber:
iOS:
AndroidBundleVersionCode: 17
AndroidBundleVersionCode: 18
AndroidMinSdkVersion: 16
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 0
......
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