Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro2
Commits
41e65019
Commit
41e65019
authored
May 15, 2019
by
szefo09
Committed by
GitHub
May 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10 from purerosefallen/mcpro-unity
Mcpro unity
parents
f940540c
0104e43e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
+5
-1
Assets/SibylSystem/MyCard/MyCard.cs
Assets/SibylSystem/MyCard/MyCard.cs
+4
-4
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+1
-1
Assets/main.unity
Assets/main.unity
+4
-0
No files found.
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
View file @
41e65019
...
@@ -206,7 +206,11 @@ public static class TcpHelper
...
@@ -206,7 +206,11 @@ public static class TcpHelper
{
{
if
(
Program
.
I
().
menu
.
isShowed
==
false
)
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
)
if
(!
roomListChecking
)
{
{
...
...
Assets/SibylSystem/MyCard/MyCard.cs
View file @
41e65019
...
@@ -43,7 +43,7 @@ public class MyCard : WindowServantSP
...
@@ -43,7 +43,7 @@ public class MyCard : WindowServantSP
public
void
terminateThread
()
public
void
terminateThread
()
{
{
if
(!
isRequesting
&&
requestThread
=
null
)
if
(!
isRequesting
&&
requestThread
=
=
null
)
{
{
return
;
return
;
}
}
...
@@ -96,7 +96,7 @@ public class MyCard : WindowServantSP
...
@@ -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
();
(
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
;
isRequesting
=
false
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
e
!=
ThreadAbortException
)
{
if
(
e
.
GetType
()
!=
ThreadAbortException
)
{
Program
.
PrintToChat
(
InterString
.
Get
(
"未知错误: "
)
+
e
.
Message
);
Program
.
PrintToChat
(
InterString
.
Get
(
"未知错误: "
)
+
e
.
Message
);
}
else
{
}
else
{
Program
.
PrintToChat
(
"匹配已中断。"
);
Program
.
PrintToChat
(
"匹配已中断。"
);
...
@@ -106,8 +106,8 @@ public class MyCard : WindowServantSP
...
@@ -106,8 +106,8 @@ public class MyCard : WindowServantSP
}
}
void
startMatch
(
string
match_type
)
{
void
startMatch
(
string
match_type
)
{
const
string
username
=
inputUsername
.
value
;
string
username
=
inputUsername
.
value
;
const
string
password
=
inputPsw
.
value
;
string
password
=
inputPsw
.
value
;
if
(
username
==
""
||
password
==
""
)
if
(
username
==
""
||
password
==
""
)
{
{
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"用户名或密码为空。"
),
null
);
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"用户名或密码为空。"
),
null
);
...
...
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
41e65019
...
@@ -351,7 +351,7 @@ public class SelectServer : WindowServantSP
...
@@ -351,7 +351,7 @@ public class SelectServer : WindowServantSP
}
}
File
.
WriteAllText
(
"config/passwords.conf"
,
all
);
File
.
WriteAllText
(
"config/passwords.conf"
,
all
);
printFile
(
false
);
printFile
(
false
);
Program
.
I
().
mycard
.
isMatching
WithMyCard
=
false
;
Program
.
I
().
mycard
.
isMatching
=
false
;
(
new
Thread
(()
=>
{
TcpHelper
.
join
(
ipString
,
name
,
portString
,
pswString
,
versionString
);
})).
Start
();
(
new
Thread
(()
=>
{
TcpHelper
.
join
(
ipString
,
name
,
portString
,
pswString
,
versionString
);
})).
Start
();
}
}
else
else
...
...
Assets/main.unity
View file @
41e65019
...
@@ -435,6 +435,10 @@ Prefab:
...
@@ -435,6 +435,10 @@ Prefab:
propertyPath
:
new_ui_selectServer
propertyPath
:
new_ui_selectServer
value
:
value
:
objectReference
:
{
fileID
:
115020
,
guid
:
aeecebc57be069842a18f05155794f6c
,
type
:
2
}
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
}
-
target
:
{
fileID
:
11419100
,
guid
:
995e2fa1a1156d248955c5fb98502585
,
type
:
2
}
propertyPath
:
new_ui_faceShower
propertyPath
:
new_ui_faceShower
value
:
value
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment