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
List
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
Xu Chenxi
ygopro2
Commits
20e675cc
Commit
20e675cc
authored
Apr 10, 2019
by
Unicorn369
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
向记不住服务器势力低头
parent
860e5d14
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
989 deletions
+105
-989
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+101
-3
Assets/SibylSystem/selectServer/SelectServer.cs.bak
Assets/SibylSystem/selectServer/SelectServer.cs.bak
+3
-101
Assets/main.unity
Assets/main.unity
+1
-1
Assets/main.unity.bak
Assets/main.unity.bak
+0
-876
Assets/main.unity.bak.meta
Assets/main.unity.bak.meta
+0
-8
No files found.
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
20e675cc
...
...
@@ -7,30 +7,128 @@ using System.Threading;
public
class
SelectServer
:
WindowServantSP
{
UIPopupList
list
;
UIPopupList
serversList
;
UIInput
inputIP
;
UIInput
inputPort
;
UIInput
inputPsw
;
UIInput
inputVersion
;
UISprite
inputIP_
;
UISprite
inputPort_
;
public
override
void
initialize
()
{
createWindow
(
Program
.
I
().
new_ui_selectServer
);
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"face_"
,
onClickFace
);
UIHelper
.
registEvent
(
gameObject
,
"join_"
,
onClickJoin
);
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
=
Config
.
Get
(
"name"
,
"一秒一喵机会"
);
serversList
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"server"
);
serversList
.
fontSize
=
20
;
serversList
.
value
=
Config
.
Get
(
"serversPicker"
,
"[OCG]Koishi"
);
UIHelper
.
registEvent
(
gameObject
,
"server"
,
pickServer
);
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
=
Config
.
Get
(
"name"
,
"YGOPro2 User"
);
//UIHelper.getByName<UIInput>(gameObject, "name_").defaultText = "昵称不能为空";
list
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"history_"
);
UIHelper
.
registEvent
(
gameObject
,
"history_"
,
onSelected
);
name
=
Config
.
Get
(
"name"
,
"
一秒一喵机会
"
);
UIHelper
.
registEvent
(
gameObject
,
"history_"
,
onSelected
);
name
=
Config
.
Get
(
"name"
,
"
YGOPro2 User
"
);
inputIP
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
);
inputIP_
=
UIHelper
.
getByName
<
UISprite
>(
gameObject
,
"ip_"
);
//inputIP.defaultText = "服务器IP 或 域名";
inputPort
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
);
inputPort_
=
UIHelper
.
getByName
<
UISprite
>(
gameObject
,
"port_"
);
//inputPort.defaultText = "端口";
inputPsw
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
);
//inputPsw.defaultText = "房间密码";
//inputVersion = UIHelper.getByName<UIInput>(gameObject, "version_");
set_version
(
"0x"
+
String
.
Format
(
"{0:X}"
,
Config
.
ClientVersion
));
SetActiveFalse
();
}
private
void
pickServer
()
{
string
server
=
serversList
.
value
;
switch
(
server
)
{
case
"[OCG]Mercury233"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"s1.ygo233.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"233"
;
Config
.
Set
(
"serversPicker"
,
"[OCG]Mercury233"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[OCG]Koishi"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"7210"
;
Config
.
Set
(
"serversPicker"
,
"[OCG]Koishi"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[TCG]Koishi"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"1311"
;
Config
.
Set
(
"serversPicker"
,
"[TCG]Koishi"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[222DIY]Koishi"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"222"
;
Config
.
Set
(
"serversPicker"
,
"[222DIY]Koishi"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[轮抽服]2Pick"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"2pick.mycard.moe"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"765"
;
Config
.
Set
(
"serversPicker"
,
"[轮抽服]2Pick"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[OCG&TCG]한국서버"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"cygopro.fun25.co.kr"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"17225"
;
Config
.
Set
(
"serversPicker"
,
"[OCG&TCG]한국서버"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
default
:
{
Config
.
Set
(
"serversPicker"
,
"[Custom]"
);
list
.
enabled
=
true
;
inputIP_
.
enabled
=
true
;
inputPort_
.
enabled
=
true
;
break
;
}
}
}
void
onSelected
()
{
if
(
list
!=
null
)
...
...
Assets/SibylSystem/selectServer/SelectServer.cs.bak
View file @
20e675cc
...
...
@@ -7,128 +7,30 @@ using System.Threading;
public class SelectServer : WindowServantSP
{
UIPopupList list;
UIPopupList serversList;
UIInput inputIP;
UIInput inputPort;
UIInput inputPsw;
UIInput inputVersion;
UISprite inputIP_;
UISprite inputPort_;
public override void initialize()
{
createWindow(Program.I().new_ui_selectServer);
UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "face_", onClickFace);
UIHelper.registEvent(gameObject, "join_", onClickJoin);
serversList = UIHelper.getByName<UIPopupList>(gameObject, "server");
serversList.fontSize = 20;
serversList.value = Config.Get("serversPicker", "[OCG]Koishi");
UIHelper.registEvent(gameObject, "server", pickServer);
UIHelper.getByName<UIInput>(gameObject, "name_").value = Config.Get("name", "YGOPro2 User");
//UIHelper.getByName<UIInput>(gameObject, "name_").defaultText = "昵称不能为空";
UIHelper.getByName<UIInput>(gameObject, "name_").value = Config.Get("name","一秒一喵机会");
list = UIHelper.getByName<UIPopupList>(gameObject, "history_");
UIHelper.registEvent(gameObject,
"history_", onSelected);
name = Config.Get("name", "
YGOPro2 User
");
UIHelper.registEvent(gameObject,"history_", onSelected);
name = Config.Get("name", "
一秒一喵机会
");
inputIP = UIHelper.getByName<UIInput>(gameObject, "ip_");
inputIP_ = UIHelper.getByName<UISprite>(gameObject, "ip_");
//inputIP.defaultText = "服务器IP 或 域名";
inputPort = UIHelper.getByName<UIInput>(gameObject, "port_");
inputPort_ = UIHelper.getByName<UISprite>(gameObject, "port_");
//inputPort.defaultText = "端口";
inputPsw = UIHelper.getByName<UIInput>(gameObject, "psw_");
//inputPsw.defaultText = "房间密码";
//inputVersion = UIHelper.getByName<UIInput>(gameObject, "version_");
set_version("0x" + String.Format("{0:X}", Config.ClientVersion));
SetActiveFalse();
}
private void pickServer()
{
string server = serversList.value;
switch (server)
{
case "[OCG]Mercury233":
{
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "s1.ygo233.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "233";
Config.Set("serversPicker", "[OCG]Mercury233");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[OCG]Koishi":
{
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "koishi.moecube.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "7210";
Config.Set("serversPicker", "[OCG]Koishi");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[TCG]Koishi":
{
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "koishi.moecube.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "1311";
Config.Set("serversPicker", "[TCG]Koishi");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[222DIY]Koishi":
{
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "koishi.moecube.com";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "222";
Config.Set("serversPicker", "[222DIY]Koishi");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[轮抽服]2Pick":
{
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "2pick.mycard.moe";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "765";
Config.Set("serversPicker", "[轮抽服]2Pick");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
case "[OCG&TCG]한국서버":
{
UIHelper.getByName<UIInput>(gameObject, "ip_").value = "cygopro.fun25.co.kr";
UIHelper.getByName<UIInput>(gameObject, "port_").value = "17225";
Config.Set("serversPicker", "[OCG&TCG]한국서버");
list.enabled = false;
inputIP_.enabled = false;
inputPort_.enabled = false;
break;
}
default:
{
Config.Set("serversPicker", "[Custom]");
list.enabled = true;
inputIP_.enabled = true;
inputPort_.enabled = true;
break;
}
}
}
void onSelected()
{
if (list != null)
...
...
Assets/main.unity
View file @
20e675cc
...
...
@@ -434,7 +434,7 @@ Prefab:
-
target
:
{
fileID
:
11419100
,
guid
:
995e2fa1a1156d248955c5fb98502585
,
type
:
2
}
propertyPath
:
new_ui_selectServer
value
:
objectReference
:
{
fileID
:
1
65948
,
guid
:
66c270580b57825498511f78f7bc78bb
,
type
:
2
}
objectReference
:
{
fileID
:
1
15020
,
guid
:
aeecebc57be069842a18f05155794f6c
,
type
:
2
}
-
target
:
{
fileID
:
11419100
,
guid
:
995e2fa1a1156d248955c5fb98502585
,
type
:
2
}
propertyPath
:
new_ui_faceShower
value
:
...
...
Assets/main.unity.bak
deleted
100644 → 0
View file @
860e5d14
This diff is collapsed.
Click to expand it.
Assets/main.unity.bak.meta
deleted
100644 → 0
View file @
860e5d14
fileFormatVersion: 2
guid: 68e21d6a59988d04da56f134b9f37abf
timeCreated: 1554806636
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
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