Commit 378d97f2 authored by Unicorn369's avatar Unicorn369

update

parent b05d2127
......@@ -301,7 +301,7 @@ public class Program : MonoBehaviour
*/
ANDROID_GAME_PATH = jo.Call<string>("GamePath", "/ygopro2/");
if (!File.Exists(ANDROID_GAME_PATH + "updates/version2.0.txt"))
if (!File.Exists(ANDROID_GAME_PATH + "updates/version2.3.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.2.2.txt"))
if (!File.Exists(ANDROID_GAME_PATH + "updates/image_version1.3.txt"))
{
string filePath = Application.streamingAssetsPath + "/update.zip";
var www = new WWW(filePath);
......@@ -336,7 +336,7 @@ public class Program : MonoBehaviour
#elif UNITY_IPHONE //iPhone
string GamePaths = Application.persistentDataPath + "/ygopro2/";
if (!File.Exists(GamePaths + "updates/version2.0.txt"))
if (!File.Exists(GamePaths + "updates/version2.3.txt"))
{
string filePath = Application.streamingAssetsPath + "/ygopro2-data.zip";
ExtractZipFile(System.IO.File.ReadAllBytes(filePath), GamePaths);
......@@ -400,20 +400,24 @@ public class Program : MonoBehaviour
}
}
fileInfos = (new DirectoryInfo("pack")).GetFiles();
//fileInfos = (new DirectoryInfo("pack" + AppLanguage.LanguageDir())).GetFiles();
for (int i = 0; i < fileInfos.Length; i++)
if (Directory.Exists("pack"))
{
if (fileInfos[i].Name.Length > 3)
fileInfos = (new DirectoryInfo("pack")).GetFiles();
//fileInfos = (new DirectoryInfo("pack" + AppLanguage.LanguageDir())).GetFiles();
for (int i = 0; i < fileInfos.Length; i++)
{
if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 3, 3) == ".db")
if (fileInfos[i].Name.Length > 3)
{
YGOSharp.PacksManager.initialize("pack/" + fileInfos[i].Name);
//YGOSharp.PacksManager.initialize("pack" + AppLanguage.LanguageDir() + "/" + fileInfos[i].Name);
if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 3, 3) == ".db")
{
YGOSharp.PacksManager.initialize("pack/" + fileInfos[i].Name);
//YGOSharp.PacksManager.initialize("pack" + AppLanguage.LanguageDir() + "/" + fileInfos[i].Name);
}
}
}
YGOSharp.PacksManager.initializeSec();
}
YGOSharp.PacksManager.initializeSec();
initializeALLservants();
loadResources();
......@@ -422,10 +426,10 @@ public class Program : MonoBehaviour
{
if (File.Exists("pics.zip")) {
jo.Call("doExtractZipFile", "pics.zip", ANDROID_GAME_PATH);
File.Copy("updates/version2.0.txt", "updates/image_version1.2.txt", true);
File.Copy("updates/version2.3.txt", "updates/image_version1.2.txt", true);
} else if (File.Exists(ANDROID_GAME_PATH + "../ygocore/pics.zip")) {
jo.Call("doExtractZipFile", ANDROID_GAME_PATH + "../ygocore/pics.zip", ANDROID_GAME_PATH);
File.Copy("updates/version2.0.txt", "updates/image_version1.2.txt", true);
File.Copy("updates/version2.3.txt", "updates/image_version1.2.txt", true);
} else {
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/pics.zip");
}
......@@ -1035,7 +1039,7 @@ public class Program : MonoBehaviour
_padScroll = 0;
}
GUI.Label(new Rect(10, 5, 200, 200), "[Ver 2.2.7] " + "FPS: " + m_FPS);
GUI.Label(new Rect(10, 5, 200, 200), "[Ver 2.3] " + "FPS: " + m_FPS);
}
void Update()
......
......@@ -90,7 +90,7 @@ public class RoomList : WindowServantSP
}
else
{
Program.PrintToChat(InterString.Get("抱歉!您尚未选择房间。"));
Program.PrintToChat(InterString.Get("请选择房间!!!"));
}
}
......
......@@ -17,8 +17,6 @@ public class SelectServer : WindowServantSP
UISprite inputIP_;
UISprite inputPort_;
static bool EditIpAndPort;
public override void initialize()
{
createWindow(Program.I().new_ui_selectServer);
......@@ -83,7 +81,6 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "port_").value = "233";
Config.Set("serversPicker", "[OCG]Mercury233");
EditIpAndPort = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
......@@ -94,7 +91,6 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "port_").value = "7210";
Config.Set("serversPicker", "[OCG]Koishi");
EditIpAndPort = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
......@@ -105,7 +101,6 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "port_").value = "1311";
Config.Set("serversPicker", "[TCG]Koishi");
EditIpAndPort = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
......@@ -116,7 +111,6 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "port_").value = "765";
Config.Set("serversPicker", "[轮抽服]2Pick");
EditIpAndPort = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
......@@ -127,7 +121,6 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "port_").value = "17225";
Config.Set("serversPicker", "[OCG&TCG]한국서버");
EditIpAndPort = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
......@@ -138,7 +131,6 @@ public class SelectServer : WindowServantSP
UIHelper.getByName<UIInput>(gameObject, "port_").value = "7911";
Config.Set("serversPicker", "[OCG&TCG]YGOhollow (JP)");
EditIpAndPort = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
......@@ -152,7 +144,6 @@ public class SelectServer : WindowServantSP
Config.Set("serversPicker", "[Custom]");
}
EditIpAndPort = true;
inputIP_.enabled = true;
inputPort_.enabled = true;
break;
......@@ -171,6 +162,7 @@ public class SelectServer : WindowServantSP
private void readString(string str)
{
/*
str = str.Substring(1, str.Length - 1);
string version = "", remain = "";
string[] splited;
......@@ -209,6 +201,8 @@ public class SelectServer : WindowServantSP
inputPort.value = port;
}
inputPsw.value = psw;
*/
inputPsw.value = str;
//inputVersion.value = version;
}
......@@ -229,11 +223,11 @@ public class SelectServer : WindowServantSP
void printFile(bool first)
{
list.Clear();
if (File.Exists("config/hosts.conf") == false)
if (File.Exists("config/passwords.conf") == false)
{
File.Create("config/hosts.conf").Close();
File.Create("config/passwords.conf").Close();
}
string txtString = File.ReadAllText("config/hosts.conf");
string txtString = File.ReadAllText("config/passwords.conf");
string[] lines = txtString.Replace("\r", "").Split("\n");
for (int i = 0; i < lines.Length; i++)
{
......@@ -310,11 +304,12 @@ public class SelectServer : WindowServantSP
{
if (name != "")
{
string fantasty = "(" + versionString + ")" + ipString + ":" + portString + " " + pswString;
//string fantasty = "(" + versionString + ")" + ipString + ":" + portString + " " + pswString;
string fantasty = pswString;
list.items.Remove(fantasty);
list.items.Insert(0, fantasty);
list.value = fantasty;
if (list.items.Count>5)
if (list.items.Count > 5)
{
list.items.RemoveAt(list.items.Count - 1);
}
......@@ -323,9 +318,9 @@ public class SelectServer : WindowServantSP
{
all += list.items[i] + "\r\n";
}
File.WriteAllText("config/hosts.conf", all);
File.WriteAllText("config/passwords.conf", all);
printFile(false);
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString,versionString); })).Start();
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString, versionString); })).Start();
}
else
{
......
......@@ -362,7 +362,7 @@ GameObject:
- component: {fileID: 461314}
- component: {fileID: 11487460}
m_Layer: 18
m_Name: '!lable'
m_Name: '!lable_'
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -668,7 +668,7 @@ Transform:
m_Children:
- {fileID: 432674}
m_Father: {fileID: 472854}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &408120
Transform:
......@@ -846,12 +846,12 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 159768}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 152.7, y: 0, z: 0}
m_LocalPosition: {x: 125, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 442160}
m_Father: {fileID: 472854}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &431974
Transform:
......@@ -917,7 +917,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 184660}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -125, y: 12, z: 0}
m_LocalPosition: {x: -98, y: 12, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 431316}
......@@ -986,12 +986,12 @@ Transform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 159702}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -35, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 265, y: -0.0000038146973, z: 0}
m_LocalScale: {x: 1.0001493, y: 1.0001488, z: 1.0001488}
m_Children: []
m_Father: {fileID: 472854}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &472854
Transform:
......@@ -1003,6 +1003,7 @@ Transform:
m_LocalPosition: {x: -113.8, y: -60, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4620669052562040}
- {fileID: 461314}
- {fileID: 431316}
- {fileID: 407960}
......@@ -1116,7 +1117,7 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 255, y: 34, z: 0}
m_Size: {x: 200, y: 34, z: 0}
m_Center: {x: 0, y: 0, z: 0}
--- !u!65 &6512340
BoxCollider:
......@@ -1735,13 +1736,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 255
mWidth: 200
mHeight: 34
mDepth: 20
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 7.5
aspectRatio: 5.882353
mType: 1
mFillDirection: 4
mFillAmount: 1
......@@ -2008,13 +2009,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 300
mWidth: 150
mHeight: 28
mDepth: 100
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 10.714286
aspectRatio: 5.357143
--- !u!114 &11435380
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -2770,13 +2771,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 0.40392157}
mPivot: 0
mWidth: 248
mWidth: 193
mHeight: 24
mDepth: 21
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 10.333333
aspectRatio: 8.041667
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0}
......@@ -2938,7 +2939,7 @@ MonoBehaviour:
mText: "\u7AEF\u53E3"
mFontSize: 18
mFontStyle: 0
mAlignment: 2
mAlignment: 1
mEncoding: 0
mMaxLineCount: 1
mEffectStyle: 0
......@@ -3195,17 +3196,17 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 120
mWidth: 50
mHeight: 26
mDepth: 25
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 4.6153846
aspectRatio: 1.9230769
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0}
mText: "\u4E3B\u673A\u5730\u5740\uFF1A"
mText: "\u7AEF\u53E3\uFF1A"
mFontSize: 22
mFontStyle: 0
mAlignment: 3
......@@ -3488,3 +3489,98 @@ Prefab:
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 115020}
m_IsPrefabParent: 1
--- !u!1 &1580018882127394
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4620669052562040}
- component: {fileID: 114157960367862120}
m_Layer: 18
m_Name: '!lable'
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4620669052562040
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1580018882127394}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -35, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 472854}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114157960367862120
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1580018882127394}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e9d0b5f3bbe925a408bd595c79d0bf63, type: 3}
m_Name:
m_EditorClassIdentifier:
leftAnchor:
target: {fileID: 0}
relative: 0
absolute: 0
rightAnchor:
target: {fileID: 0}
relative: 1
absolute: 0
bottomAnchor:
target: {fileID: 0}
relative: 0
absolute: 0
topAnchor:
target: {fileID: 0}
relative: 1
absolute: 0
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 120
mHeight: 26
mDepth: 25
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 4.6153846
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0}
mText: "\u4E3B\u673A\u5730\u5740\uFF1A"
mFontSize: 22
mFontStyle: 0
mAlignment: 3
mEncoding: 1
mMaxLineCount: 0
mEffectStyle: 1
mEffectColor: {r: 0, g: 0, b: 0, a: 1}
mSymbols: 1
mEffectDistance: {x: 1, y: 1}
mOverflow: 0
mMaterial: {fileID: 0}
mApplyGradient: 0
mGradientTop: {r: 1, g: 1, b: 1, a: 1}
mGradientBottom: {r: 0.7, g: 0.7, b: 0.7, a: 1}
mSpacingX: 0
mSpacingY: 0
mUseFloatSpacing: 0
mFloatSpacingX: 0
mFloatSpacingY: 0
mOverflowEllipsis: 0
mShrinkToFit: 0
mMaxLineWidth: 0
mMaxLineHeight: 0
mLineWidth: 0
mMultiline: 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