Commit 41e65019 authored by szefo09's avatar szefo09 Committed by GitHub

Merge pull request #10 from purerosefallen/mcpro-unity

Mcpro unity
parents f940540c 0104e43e
......@@ -206,7 +206,11 @@ public static class TcpHelper
{
if (Program.I().menu.isShowed == false)
{
Program.I().shiftToServant(Program.I().mycard.isMatching ? Program.I().mycard : Program.I().selectServer);
if (Program.I().mycard.isMatching) {
Program.I().shiftToServant(Program.I().mycard);
} else {
Program.I().shiftToServant(Program.I().selectServer);
}
}
if (!roomListChecking)
{
......
......@@ -43,7 +43,7 @@ public class MyCard : WindowServantSP
public void terminateThread()
{
if (!isRequesting && requestThread = null)
if (!isRequesting && requestThread == null)
{
return;
}
......@@ -96,7 +96,7 @@ public class MyCard : WindowServantSP
(new Thread(() => { TcpHelper.join(mycard_ip, username, match_type == "athletic" ? athletic_port : entertain_port, pswString, "0x" + String.Format("{0:X}", Config.ClientVersion)); })).Start();
isRequesting = false;
} catch (Exception e) {
if (e != ThreadAbortException) {
if (e.GetType() != ThreadAbortException) {
Program.PrintToChat(InterString.Get("未知错误: ") + e.Message);
} else {
Program.PrintToChat("匹配已中断。");
......@@ -106,8 +106,8 @@ public class MyCard : WindowServantSP
}
void startMatch(string match_type) {
const string username = inputUsername.value;
const string password = inputPsw.value;
string username = inputUsername.value;
string password = inputPsw.value;
if (username == "" || password == "")
{
RMSshow_onlyYes("", InterString.Get("用户名或密码为空。"), null);
......
......@@ -351,7 +351,7 @@ public class SelectServer : WindowServantSP
}
File.WriteAllText("config/passwords.conf", all);
printFile(false);
Program.I().mycard.isMatchingWithMyCard = false;
Program.I().mycard.isMatching = false;
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString, versionString); })).Start();
}
else
......
......@@ -435,6 +435,10 @@ Prefab:
propertyPath: new_ui_selectServer
value:
objectReference: {fileID: 115020, guid: aeecebc57be069842a18f05155794f6c, type: 2}
- target: {fileID: 11419100, guid: 995e2fa1a1156d248955c5fb98502585, type: 2}
propertyPath: new_ui_mycard
value:
objectReference: {fileID: 115021, guid: 1e21549c701d371459f1cd723da1a709, type: 2}
- target: {fileID: 11419100, guid: 995e2fa1a1156d248955c5fb98502585, type: 2}
propertyPath: new_ui_faceShower
value:
......
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