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
mercury233
ygopro2
Commits
0123822f
Commit
0123822f
authored
Apr 11, 2019
by
Unicorn369
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Test' of
https://github.com/Unicorn369/YGOPro2_Droid
into Android
parents
29591290
3066cb8b
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
704 additions
and
156 deletions
+704
-156
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
+5
-2
Assets/NGUI/Scripts/UI/UICamera.cs
Assets/NGUI/Scripts/UI/UICamera.cs
+2
-2
Assets/SibylSystem/MonoHelpers/SuperScrollView.cs
Assets/SibylSystem/MonoHelpers/SuperScrollView.cs
+2
-1
Assets/SibylSystem/MonoHelpers/UIHelper.cs
Assets/SibylSystem/MonoHelpers/UIHelper.cs
+58
-9
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+1
-1
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+23
-0
Assets/SibylSystem/SelectDeck/selectDeck.cs
Assets/SibylSystem/SelectDeck/selectDeck.cs
+6
-0
Assets/SibylSystem/Setting/Setting.cs
Assets/SibylSystem/Setting/Setting.cs
+33
-7
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+86
-110
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+31
-4
Assets/transUI/prefab/trans_setting.prefab
Assets/transUI/prefab/trans_setting.prefab
+455
-18
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+2
-2
No files found.
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
View file @
0123822f
...
@@ -5,6 +5,7 @@ using System;
...
@@ -5,6 +5,7 @@ using System;
public
class
MonoCardInDeckManager
:
MonoBehaviour
{
public
class
MonoCardInDeckManager
:
MonoBehaviour
{
int
loadedPicCode
=
0
;
int
loadedPicCode
=
0
;
YGOSharp
.
Banlist
loaded_banlist
=
null
;
YGOSharp
.
Banlist
loaded_banlist
=
null
;
public
bool
dying
=
false
;
bool
died
=
false
;
bool
died
=
false
;
public
YGOSharp
.
Card
cardData
=
new
YGOSharp
.
Card
();
public
YGOSharp
.
Card
cardData
=
new
YGOSharp
.
Card
();
...
@@ -61,6 +62,7 @@ public class MonoCardInDeckManager : MonoBehaviour {
...
@@ -61,6 +62,7 @@ public class MonoCardInDeckManager : MonoBehaviour {
}
}
else
else
{
{
dying
=
true
;
died
=
true
;
died
=
true
;
gameObject
.
SetActive
(
false
);
gameObject
.
SetActive
(
false
);
}
}
...
@@ -96,12 +98,13 @@ public class MonoCardInDeckManager : MonoBehaviour {
...
@@ -96,12 +98,13 @@ public class MonoCardInDeckManager : MonoBehaviour {
{
{
physicalON
();
physicalON
();
isDraging
=
false
;
isDraging
=
false
;
if
(
Input
.
GetKey
(
KeyCode
.
LeftControl
)
||
Input
.
GetKey
(
KeyCode
.
RightControl
)
||
getIfAlive
()==
false
)
if
(
Input
.
GetKey
(
KeyCode
.
LeftControl
)
||
Input
.
GetKey
(
KeyCode
.
RightControl
)
||
getIfAlive
()
==
false
)
{
{
Vector3
form_position
=
getGoodPosition
(
4
);
Vector3
form_position
=
getGoodPosition
(
4
);
Vector3
to_position
=
getGoodPosition
(
0
);
Vector3
to_position
=
getGoodPosition
(
0
);
Vector3
delta_position
=
to_position
-
form_position
;
Vector3
delta_position
=
to_position
-
form_position
;
GetComponent
<
Rigidbody
>().
AddForce
(
delta_position
*
200
);
GetComponent
<
Rigidbody
>().
AddForce
(
delta_position
*
1000
);
dying
=
true
;
}
}
}
}
...
...
Assets/NGUI/Scripts/UI/UICamera.cs
View file @
0123822f
...
@@ -236,7 +236,7 @@ public class UICamera : MonoBehaviour
...
@@ -236,7 +236,7 @@ public class UICamera : MonoBehaviour
/// Whether the joystick and controller events will be processed.
/// Whether the joystick and controller events will be processed.
/// </summary>
/// </summary>
public
bool
useController
=
tru
e
;
public
bool
useController
=
fals
e
;
[
System
.
Obsolete
(
"Use new OnDragStart / OnDragOver / OnDragOut / OnDragEnd events instead"
)]
[
System
.
Obsolete
(
"Use new OnDragStart / OnDragOver / OnDragOut / OnDragEnd events instead"
)]
public
bool
stickyPress
{
get
{
return
true
;
}
}
public
bool
stickyPress
{
get
{
return
true
;
}
}
...
@@ -372,7 +372,7 @@ public class UICamera : MonoBehaviour
...
@@ -372,7 +372,7 @@ public class UICamera : MonoBehaviour
}
}
}
}
static
bool
mDisableController
=
fals
e
;
static
bool
mDisableController
=
tru
e
;
static
Vector2
mLastPos
=
Vector2
.
zero
;
static
Vector2
mLastPos
=
Vector2
.
zero
;
/// <summary>
/// <summary>
...
...
Assets/SibylSystem/MonoHelpers/SuperScrollView.cs
View file @
0123822f
...
@@ -212,7 +212,8 @@ public class SuperScrollView
...
@@ -212,7 +212,8 @@ public class SuperScrollView
{
{
moveFloat
=
panel
.
baseClipRegion
.
y
+
(
panel
.
GetViewSize
().
y
-
heightOfEach
)
/
2
-
10
;
moveFloat
=
panel
.
baseClipRegion
.
y
+
(
panel
.
GetViewSize
().
y
-
heightOfEach
)
/
2
-
10
;
maxFloat
=
-(
heightOfEach
*
Items
.
Count
-
panel
.
GetViewSize
().
y
+
20
);
maxFloat
=
-(
heightOfEach
*
Items
.
Count
-
panel
.
GetViewSize
().
y
+
20
);
if
(
maxFloat
>
0
)
// 1900x1000 resolution and 11 cards displayed caused this value to reach exactly 0 and crash the game.
if
(
maxFloat
>=
0
)
{
{
maxFloat
=
-
0.001f
;
maxFloat
=
-
0.001f
;
}
}
...
...
Assets/SibylSystem/MonoHelpers/UIHelper.cs
View file @
0123822f
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Text
;
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
...
@@ -11,31 +12,45 @@ public static class UIHelper
...
@@ -11,31 +12,45 @@ public static class UIHelper
[
DllImport
(
"user32"
)]
[
DllImport
(
"user32"
)]
static
extern
bool
FlashWindow
(
IntPtr
handle
,
bool
invert
);
static
extern
bool
FlashWindow
(
IntPtr
handle
,
bool
invert
);
public
delegate
bool
WNDENUMPROC
(
IntPtr
hwnd
,
uint
lParam
);
public
delegate
bool
WNDENUMPROC
(
IntPtr
hwnd
,
IntPtr
lParam
);
[
DllImport
(
"user32"
,
SetLastError
=
true
)]
[
DllImport
(
"user32"
,
SetLastError
=
true
)]
static
extern
bool
EnumWindows
(
WNDENUMPROC
lpEnumFunc
,
uint
lParam
);
static
extern
bool
EnumWindows
(
WNDENUMPROC
lpEnumFunc
,
IntPtr
lParam
);
[
DllImport
(
"user32"
,
SetLastError
=
true
)]
[
DllImport
(
"user32"
,
SetLastError
=
true
)]
static
extern
IntPtr
GetParent
(
IntPtr
hWnd
);
static
extern
IntPtr
GetParent
(
IntPtr
hWnd
);
[
DllImport
(
"user32"
)]
[
DllImport
(
"user32"
)]
static
extern
uint
GetWindowThreadProcessId
(
IntPtr
hWnd
,
ref
uint
lpdwProcessId
);
static
extern
uint
GetWindowThreadProcessId
(
IntPtr
hWnd
,
ref
IntPtr
lpdwProcessId
);
[
DllImport
(
"user32"
)]
static
extern
int
GetClassNameW
(
IntPtr
hWnd
,
[
MarshalAs
(
UnmanagedType
.
LPWStr
)]
StringBuilder
lpString
,
int
nMaxCount
);
[
DllImport
(
"user32"
)]
static
extern
bool
IsZoomed
(
IntPtr
hWnd
);
[
DllImport
(
"user32"
)]
static
extern
bool
ShowWindow
(
IntPtr
hWnd
,
int
nCmdShow
);
[
DllImport
(
"kernel32"
)]
[
DllImport
(
"kernel32"
)]
static
extern
void
SetLastError
(
uint
dwErrCode
);
static
extern
void
SetLastError
(
uint
dwErrCode
);
static
IntPtr
myHWND
=
IntPtr
.
Zero
;
static
IntPtr
GetProcessWnd
()
static
IntPtr
GetProcessWnd
()
{
{
if
(
myHWND
!=
IntPtr
.
Zero
)
return
myHWND
;
IntPtr
ptrWnd
=
IntPtr
.
Zero
;
IntPtr
ptrWnd
=
IntPtr
.
Zero
;
uint
pid
=
(
uint
)
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Id
;
// 当前进程 ID
IntPtr
pid
=
(
IntPtr
)
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Id
;
// 当前进程 ID
bool
bResult
=
EnumWindows
(
new
WNDENUMPROC
(
delegate
(
IntPtr
hwnd
,
uint
lParam
)
bool
bResult
=
EnumWindows
(
new
WNDENUMPROC
(
delegate
(
IntPtr
hwnd
,
IntPtr
mypid
)
{
{
uint
id
=
0
;
IntPtr
id
=
IntPtr
.
Zero
;
if
(
GetParent
(
hwnd
)
==
IntPtr
.
Zero
)
StringBuilder
ClassName
=
new
StringBuilder
(
256
);
GetClassNameW
(
hwnd
,
ClassName
,
ClassName
.
Capacity
);
if
(
string
.
Compare
(
ClassName
.
ToString
(),
"UnityWndClass"
,
true
,
System
.
Globalization
.
CultureInfo
.
InvariantCulture
)
==
0
)
{
{
GetWindowThreadProcessId
(
hwnd
,
ref
id
);
GetWindowThreadProcessId
(
hwnd
,
ref
id
);
if
(
id
==
lParam
)
// 找到进程对应的主窗口句柄
if
(
id
==
mypid
)
// 找到进程对应的主窗口句柄
{
{
ptrWnd
=
hwnd
;
// 把句柄缓存起来
ptrWnd
=
hwnd
;
// 把句柄缓存起来
SetLastError
(
0
);
// 设置无错误
SetLastError
(
0
);
// 设置无错误
...
@@ -47,7 +62,12 @@ public static class UIHelper
...
@@ -47,7 +62,12 @@ public static class UIHelper
}),
pid
);
}),
pid
);
return
(!
bResult
&&
Marshal
.
GetLastWin32Error
()
==
0
)
?
ptrWnd
:
IntPtr
.
Zero
;
if
(!
bResult
&&
Marshal
.
GetLastWin32Error
()
==
0
)
{
myHWND
=
ptrWnd
;
}
return
myHWND
;
}
}
public
static
void
Flash
()
public
static
void
Flash
()
...
@@ -55,6 +75,35 @@ public static class UIHelper
...
@@ -55,6 +75,35 @@ public static class UIHelper
FlashWindow
(
GetProcessWnd
(),
true
);
FlashWindow
(
GetProcessWnd
(),
true
);
}
}
public
static
bool
isMaximized
()
{
#if UNITY_STANDALONE_WIN
return
IsZoomed
(
GetProcessWnd
());
#else
// not a easy thing to check window status on non-windows desktop...
return
false
;
#endif
}
public
static
void
MaximizeWindow
()
{
#if UNITY_STANDALONE_WIN
ShowWindow
(
GetProcessWnd
(),
3
);
// SW_MAXIMIZE
#endif
}
public
static
void
RestoreWindow
()
{
#if UNITY_STANDALONE_WIN
ShowWindow
(
GetProcessWnd
(),
9
);
// SW_RESTORE
#endif
}
public
static
bool
shouldMaximize
()
{
return
fromStringToBool
(
Config
.
Get
(
"maximize_"
,
"0"
));
}
public
enum
RenderingMode
public
enum
RenderingMode
{
{
Opaque
,
Opaque
,
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
0123822f
...
@@ -6649,7 +6649,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6649,7 +6649,7 @@ public class Ocgcore : ServantWithCardDescription
//op_m[m].isMinBlockMode = true;
//op_m[m].isMinBlockMode = true;
if
(
Program
.
getVerticalTransparency
()
>=
0.5f
)
if
(
Program
.
getVerticalTransparency
()
>=
0.5f
)
{
{
gameField
.
isLong
=
true
;
//这个设定暂时取消
了
gameField
.
isLong
=
Program
.
longField
;
//这个设定恢复(?)
了
}
}
}
}
}
}
...
...
Assets/SibylSystem/Program.cs
View file @
0123822f
...
@@ -1166,6 +1166,8 @@ public class Program : MonoBehaviour
...
@@ -1166,6 +1166,8 @@ public class Program : MonoBehaviour
{
{
preWid
=
Screen
.
width
;
preWid
=
Screen
.
width
;
preheight
=
Screen
.
height
;
preheight
=
Screen
.
height
;
//if (setting != null)
// setting.setScreenSizeValue();
Program
.
notGo
(
fixScreenProblems
);
Program
.
notGo
(
fixScreenProblems
);
Program
.
go
(
500
,
fixScreenProblems
);
Program
.
go
(
500
,
fixScreenProblems
);
}
}
...
@@ -1177,8 +1179,24 @@ public class Program : MonoBehaviour
...
@@ -1177,8 +1179,24 @@ public class Program : MonoBehaviour
#endif
#endif
}
}
public
static
void
PrintToChat
(
object
o
)
{
try
{
instance
.
cardDescription
.
mLog
(
o
.
ToString
());
}
catch
{
DEBUGLOG
(
o
);
}
}
void
gameStart
()
void
gameStart
()
{
{
if
(
UIHelper
.
shouldMaximize
())
{
UIHelper
.
MaximizeWindow
();
}
backGroundPic
.
show
();
backGroundPic
.
show
();
shiftToServant
(
menu
);
shiftToServant
(
menu
);
}
}
...
@@ -1188,6 +1206,7 @@ public class Program : MonoBehaviour
...
@@ -1188,6 +1206,7 @@ public class Program : MonoBehaviour
public
static
bool
MonsterCloud
=
false
;
public
static
bool
MonsterCloud
=
false
;
public
static
float
fieldSize
=
1
;
public
static
float
fieldSize
=
1
;
public
static
bool
longField
=
false
;
void
OnApplicationQuit
()
void
OnApplicationQuit
()
{
{
...
@@ -1223,6 +1242,10 @@ public class Program : MonoBehaviour
...
@@ -1223,6 +1242,10 @@ public class Program : MonoBehaviour
#
endregion
#
endregion
public
static
void
gugugu
()
{
PrintToChat
(
InterString
.
Get
(
"非常抱歉,因为技术原因,此功能暂时无法使用。请关注官方网站获取更多消息。"
));
}
//递归创建目录
//递归创建目录
private
static
void
DirPaths
(
string
filefullpath
)
private
static
void
DirPaths
(
string
filefullpath
)
{
{
...
...
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
0123822f
...
@@ -32,6 +32,12 @@ public class selectDeck : WindowServantSP
...
@@ -32,6 +32,12 @@ public class selectDeck : WindowServantSP
UIHelper
.
registEvent
(
gameObject
,
"copy_"
,
onCopy
);
UIHelper
.
registEvent
(
gameObject
,
"copy_"
,
onCopy
);
UIHelper
.
registEvent
(
gameObject
,
"rename_"
,
onRename
);
UIHelper
.
registEvent
(
gameObject
,
"rename_"
,
onRename
);
UIHelper
.
registEvent
(
gameObject
,
"code_"
,
onCode
);
UIHelper
.
registEvent
(
gameObject
,
"code_"
,
onCode
);
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
{
UIHelper
.
getByName
<
UILabel
>(
gameObject
,
"!default"
).
text
=
"搜索卡组"
;
}
else
{
UIHelper
.
getByName
<
UILabel
>(
gameObject
,
"!default"
).
text
=
"Search"
;
}
searchInput
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"search_"
);
searchInput
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"search_"
);
superScrollView
.
install
();
superScrollView
.
install
();
for
(
int
i
=
0
;
i
<
quickCards
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
quickCards
.
Length
;
i
++)
...
...
Assets/SibylSystem/Setting/Setting.cs
View file @
0123822f
...
@@ -15,15 +15,15 @@ public class Setting : WindowServant2D
...
@@ -15,15 +15,15 @@ public class Setting : WindowServant2D
UIHelper
.
registEvent
(
gameObject
,
"full_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"full_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"resize_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"resize_"
,
resizeScreen
);
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
=
Screen
.
fullScreen
;
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
=
Screen
.
fullScreen
;
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
=
Screen
.
width
.
ToString
()
+
"*"
+
Screen
.
height
.
ToString
();
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreWatcher_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"ignoreWatcher_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreWatcher_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"ignoreWatcher_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreOP_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"ignoreOP_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreOP_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"ignoreOP_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"smartSelect_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"smartSelect_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"smartSelect_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"smartSelect_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"autoChain_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"autoChain_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"autoChain_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"autoChain_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"handPosition_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"handPosition_"
,
"
0
"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"handPosition_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"handPosition_"
,
"
1
"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"handmPosition_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"handmPosition_"
,
"
0
"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"handmPosition_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"handmPosition_"
,
"
1
"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"spyer_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"spyer_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"spyer_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"spyer_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"resize_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"resize_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"resize_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"resize_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"longField_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"longField_"
,
"0"
));
if
(
QualitySettings
.
GetQualityLevel
()
<
3
)
if
(
QualitySettings
.
GetQualityLevel
()
<
3
)
{
{
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"high_"
).
value
=
false
;
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"high_"
).
value
=
false
;
...
@@ -40,11 +40,12 @@ public class Setting : WindowServant2D
...
@@ -40,11 +40,12 @@ public class Setting : WindowServant2D
UIHelper
.
registEvent
(
gameObject
,
"handmPosition_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"handmPosition_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"spyer_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"spyer_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"high_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"high_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"longField_"
,
onChangeLongField
);
UIHelper
.
registEvent
(
gameObject
,
"size_"
,
onChangeSize
);
UIHelper
.
registEvent
(
gameObject
,
"size_"
,
onChangeSize
);
UIHelper
.
registEvent
(
gameObject
,
"alpha_"
,
onChangeAlpha
);
//
UIHelper.registEvent(gameObject, "alpha_", onChangeAlpha);
UIHelper
.
registEvent
(
gameObject
,
"vSize_"
,
onChangeVsize
);
UIHelper
.
registEvent
(
gameObject
,
"vSize_"
,
onChangeVsize
);
sliderSize
=
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"size_"
);
sliderSize
=
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"size_"
);
sliderAlpha
=
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"alpha_"
);
//
sliderAlpha = UIHelper.getByName<UISlider>(gameObject, "alpha_");
sliderVsize
=
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vSize_"
);
sliderVsize
=
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vSize_"
);
Program
.
go
(
2000
,
readVales
);
Program
.
go
(
2000
,
readVales
);
var
collection
=
gameObject
.
GetComponentsInChildren
<
UIToggle
>();
var
collection
=
gameObject
.
GetComponentsInChildren
<
UIToggle
>();
...
@@ -77,6 +78,7 @@ public class Setting : WindowServant2D
...
@@ -77,6 +78,7 @@ public class Setting : WindowServant2D
UIHelper
.
registEvent
(
setting
.
Vlink
.
gameObject
,
onCP
);
UIHelper
.
registEvent
(
setting
.
Vlink
.
gameObject
,
onCP
);
onchangeMouse
();
onchangeMouse
();
onchangeCloud
();
onchangeCloud
();
setScreenSizeValue
();
}
}
private
void
onchangeFPS
()
private
void
onchangeFPS
()
...
@@ -96,7 +98,7 @@ public class Setting : WindowServant2D
...
@@ -96,7 +98,7 @@ public class Setting : WindowServant2D
setting
.
sliderVolum
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"vol_"
,
"750"
))))
/
1000f
);
setting
.
sliderVolum
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"vol_"
,
"750"
))))
/
1000f
);
setting
.
sliderSize
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"size_"
,
"500"
))))
/
1000f
);
setting
.
sliderSize
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"size_"
,
"500"
))))
/
1000f
);
setting
.
sliderSizeDrawing
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"vSize_"
,
"500"
))))
/
1000f
);
setting
.
sliderSizeDrawing
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"vSize_"
,
"500"
))))
/
1000f
);
setting
.
sliderAlpha
.
forceValue
(((
float
)(
int
.
Parse
(
Config
.
Get
(
"alpha_"
,
"666"
))))
/
1000f
);
//
setting.sliderAlpha.forceValue(((float)(int.Parse(Config.Get("alpha_", "666")))) / 1000f);
onChangeAlpha
();
onChangeAlpha
();
onChangeSize
();
onChangeSize
();
}
}
...
@@ -121,6 +123,14 @@ public class Setting : WindowServant2D
...
@@ -121,6 +123,14 @@ public class Setting : WindowServant2D
Program
.
I
().
mouseParticle
.
SetActive
(
setting
.
mouseEffect
.
value
);
Program
.
I
().
mouseParticle
.
SetActive
(
setting
.
mouseEffect
.
value
);
}
}
//private int dontResizeTwice = 2;
public
void
setScreenSizeValue
()
{
//dontResizeTwice = 3;
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
=
Screen
.
width
.
ToString
()
+
"*"
+
Screen
.
height
.
ToString
();
}
void
onCP
()
void
onCP
()
{
{
try
try
...
@@ -182,8 +192,14 @@ public class Setting : WindowServant2D
...
@@ -182,8 +192,14 @@ public class Setting : WindowServant2D
{
{
Program
.
transparency
=
1.5f
*
sliderAlpha
.
value
;
Program
.
transparency
=
1.5f
*
sliderAlpha
.
value
;
}
}
Program
.
transparency
=
1f
;
}
}
void
onChangeLongField
()
{
Program
.
longField
=
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"longField_"
).
value
;
onCP
();
}
UISlider
sliderVsize
;
UISlider
sliderVsize
;
void
onChangeVsize
()
void
onChangeVsize
()
...
@@ -221,6 +237,14 @@ public class Setting : WindowServant2D
...
@@ -221,6 +237,14 @@ public class Setting : WindowServant2D
void
resizeScreen
()
void
resizeScreen
()
{
{
//if (dontResizeTwice > 0)
//{
// dontResizeTwice--;
// return;
//}
//dontResizeTwice = 2;
if
(
UIHelper
.
isMaximized
())
UIHelper
.
RestoreWindow
();
string
[]
mats
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
.
Split
(
new
string
[]
{
"*"
},
StringSplitOptions
.
RemoveEmptyEntries
);
string
[]
mats
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
.
Split
(
new
string
[]
{
"*"
},
StringSplitOptions
.
RemoveEmptyEntries
);
if
(
mats
.
Length
==
2
)
if
(
mats
.
Length
==
2
)
{
{
...
@@ -234,7 +258,8 @@ public class Setting : WindowServant2D
...
@@ -234,7 +258,8 @@ public class Setting : WindowServant2D
Config
.
Set
(
"vol_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vol_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"vol_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vol_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"size_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"size_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"size_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"size_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"vSize_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vSize_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"vSize_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vSize_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"alpha_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"alpha_"
).
value
*
1000
)).
ToString
());
//Config.Set("alpha_", ((int)(UIHelper.getByName<UISlider>(gameObject, "alpha_").value * 1000)).ToString());
Config
.
Set
(
"longField_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"longField_"
).
value
));
var
collection
=
gameObject
.
GetComponentsInChildren
<
UIToggle
>();
var
collection
=
gameObject
.
GetComponentsInChildren
<
UIToggle
>();
for
(
int
i
=
0
;
i
<
collection
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
collection
.
Length
;
i
++)
{
{
...
@@ -247,6 +272,7 @@ public class Setting : WindowServant2D
...
@@ -247,6 +272,7 @@ public class Setting : WindowServant2D
Config
.
Set
(
"showoffStar"
,
setting
.
showoffStar
.
value
.
ToString
());
Config
.
Set
(
"showoffStar"
,
setting
.
showoffStar
.
value
.
ToString
());
Config
.
Set
(
"LimFPS"
,
setting
.
LimFPS
.
value
.
ToString
());
Config
.
Set
(
"LimFPS"
,
setting
.
LimFPS
.
value
.
ToString
());
Config
.
Set
(
"resize_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"resize_"
).
value
));
Config
.
Set
(
"resize_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"resize_"
).
value
));
Config
.
Set
(
"maximize_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
isMaximized
()));
}
}
public
void
save
()
public
void
save
()
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
0123822f
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
0123822f
...
@@ -25,7 +25,12 @@ public class SelectServer : WindowServantSP
...
@@ -25,7 +25,12 @@ public class SelectServer : WindowServantSP
UIHelper
.
registEvent
(
gameObject
,
"join_"
,
onClickJoin
);
UIHelper
.
registEvent
(
gameObject
,
"join_"
,
onClickJoin
);
serversList
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"server"
);
serversList
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"server"
);
//serversList.fontSize = 30;
//serversList.fontSize = 30;
serversList
.
value
=
Config
.
Get
(
"serversPicker"
,
"[Custom]"
);
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
{
serversList
.
value
=
Config
.
Get
(
"serversPicker"
,
"[自定义]"
);
}
else
{
serversList
.
value
=
Config
.
Get
(
"serversPicker"
,
"[Custom]"
);
}
UIHelper
.
registEvent
(
gameObject
,
"server"
,
pickServer
);
UIHelper
.
registEvent
(
gameObject
,
"server"
,
pickServer
);
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
=
Config
.
Get
(
"name"
,
"YGOPro2 User"
);
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
=
Config
.
Get
(
"name"
,
"YGOPro2 User"
);
list
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"history_"
);
list
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"history_"
);
...
@@ -39,7 +44,7 @@ public class SelectServer : WindowServantSP
...
@@ -39,7 +44,7 @@ public class SelectServer : WindowServantSP
//inputVersion = UIHelper.getByName<UIInput>(gameObject, "version_");
//inputVersion = UIHelper.getByName<UIInput>(gameObject, "version_");
set_version
(
"0x"
+
String
.
Format
(
"{0:X}"
,
Config
.
ClientVersion
));
set_version
(
"0x"
+
String
.
Format
(
"{0:X}"
,
Config
.
ClientVersion
));
if
(
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
Simplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
{}
{}
else
//如果非要改成其他语言的话
else
//如果非要改成其他语言的话
{
{
...
@@ -54,7 +59,13 @@ public class SelectServer : WindowServantSP
...
@@ -54,7 +59,13 @@ public class SelectServer : WindowServantSP
serversList
.
items
.
Add
(
"[TCG]Koishi"
);
serversList
.
items
.
Add
(
"[TCG]Koishi"
);
serversList
.
items
.
Add
(
"[轮抽服]2Pick"
);
serversList
.
items
.
Add
(
"[轮抽服]2Pick"
);
serversList
.
items
.
Add
(
"[OCG&TCG]한국서버"
);
serversList
.
items
.
Add
(
"[OCG&TCG]한국서버"
);
serversList
.
items
.
Add
(
"[Custom]"
);
serversList
.
items
.
Add
(
"[OCG&TCG]YGOhollow (JP)"
);
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
{
serversList
.
items
.
Add
(
"[自定义]"
);
}
else
{
serversList
.
items
.
Add
(
"[Custom]"
);
}
SetActiveFalse
();
SetActiveFalse
();
}
}
...
@@ -119,9 +130,25 @@ public class SelectServer : WindowServantSP
...
@@ -119,9 +130,25 @@ public class SelectServer : WindowServantSP
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
case
"[OCG&TCG]YGOhollow (JP)"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"ygosvrjp.tk"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"7911"
;
Config
.
Set
(
"serversPicker"
,
"[OCG&TCG]YGOhollow (JP)"
);
list
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
default
:
default
:
{
{
Config
.
Set
(
"serversPicker"
,
"[Custom]"
);
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
{
Config
.
Set
(
"serversPicker"
,
"[自定义]"
);
}
else
{
Config
.
Set
(
"serversPicker"
,
"[Custom]"
);
}
list
.
enabled
=
true
;
list
.
enabled
=
true
;
inputIP_
.
enabled
=
true
;
inputIP_
.
enabled
=
true
;
...
...
Assets/transUI/prefab/trans_setting.prefab
View file @
0123822f
This diff is collapsed.
Click to expand it.
ProjectSettings/ProjectSettings.asset
View file @
0123822f
...
@@ -15,7 +15,7 @@ PlayerSettings:
...
@@ -15,7 +15,7 @@ PlayerSettings:
defaultCursor
:
{
fileID
:
0
}
defaultCursor
:
{
fileID
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
m_SplashScreenBackgroundColor
:
{
r
:
0.13333334
,
g
:
0.17254902
,
b
:
0.21176471
,
a
:
1
}
m_SplashScreenBackgroundColor
:
{
r
:
0.13333334
,
g
:
0.17254902
,
b
:
0.21176471
,
a
:
1
}
m_ShowUnitySplashScreen
:
1
m_ShowUnitySplashScreen
:
0
m_ShowUnitySplashLogo
:
1
m_ShowUnitySplashLogo
:
1
m_SplashScreenOverlayOpacity
:
1
m_SplashScreenOverlayOpacity
:
1
m_SplashScreenAnimation
:
1
m_SplashScreenAnimation
:
1
...
@@ -76,7 +76,7 @@ PlayerSettings:
...
@@ -76,7 +76,7 @@ PlayerSettings:
usePlayerLog
:
1
usePlayerLog
:
1
bakeCollisionMeshes
:
0
bakeCollisionMeshes
:
0
forceSingleInstance
:
0
forceSingleInstance
:
0
resizableWindow
:
0
resizableWindow
:
1
useMacAppStoreValidation
:
0
useMacAppStoreValidation
:
0
macAppStoreCategory
:
public.app-category.games
macAppStoreCategory
:
public.app-category.games
gpuSkinning
:
0
gpuSkinning
:
0
...
...
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