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
1
Issues
1
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
hex
ygopro2
Commits
e1aa4010
Commit
e1aa4010
authored
Aug 03, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix and optimized
parent
72ddde14
Pipeline
#39840
failed
Changes
8
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
296 additions
and
143 deletions
+296
-143
Assets/SibylSystem/MonoHelpers/UIHelper.cs
Assets/SibylSystem/MonoHelpers/UIHelper.cs
+205
-57
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
+48
-46
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
+1
-1
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+0
-2
Assets/SibylSystem/SelectDeck/selectDeck.cs
Assets/SibylSystem/SelectDeck/selectDeck.cs
+35
-33
Assets/SibylSystem/Servant.cs
Assets/SibylSystem/Servant.cs
+1
-0
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+4
-2
Assets/old/UiverseAssests/art_plugin/attack_light_line/ocgcore/mod_ocgcore_atk_fire.prefab
...gin/attack_light_line/ocgcore/mod_ocgcore_atk_fire.prefab
+2
-2
No files found.
Assets/SibylSystem/MonoHelpers/UIHelper.cs
View file @
e1aa4010
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
View file @
e1aa4010
...
...
@@ -2432,31 +2432,31 @@ public class gameCard : OCGobject
{
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
texc
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_feature
);
if
(
tex
!
=
null
)
if
(
tex
=
=
null
)
{
if
(
texc
!=
null
)
{
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
refreshFunctions
.
Remove
(
SOH_act
);
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShowerA
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
I
().
ui_main_2d
,
true
)
.
GetComponent
<
YGO1superShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
(
int
)(
500f
/
k
);
shower
.
closeup
.
width
=
(
int
)(
(
500f
/
k
)
*
((
float
)
texc
.
width
)
/
((
float
)
texc
.
height
)
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
}
return
;
}
if
(
texc
==
null
)
{
return
;
}
// float k = GameTextureManager.getK(data.Id, GameTextureType.card_feature);
refreshFunctions
.
Remove
(
SOH_act
);
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShowerA
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
I
().
ui_main_2d
,
true
)
.
GetComponent
<
YGO1superShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
360
;
shower
.
closeup
.
width
=
(
int
)(
360
*
shower
.
closeup
.
mainTexture
.
width
/
shower
.
closeup
.
mainTexture
.
height
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
}
private
void
SOH_nAct
()
...
...
@@ -2493,31 +2493,33 @@ public class gameCard : OCGobject
{
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
texc
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_feature
);
if
(
tex
!
=
null
)
if
(
tex
=
=
null
)
{
if
(
texc
!=
null
)
{
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
refreshFunctions
.
Remove
(
SOH_sum
);
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShower
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
I
().
ui_main_2d
,
true
)
.
GetComponent
<
YGO1superShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
(
int
)(
500f
/
k
);
shower
.
closeup
.
width
=
(
int
)(
(
500f
/
k
)
*
((
float
)
texc
.
width
)
/
((
float
)
texc
.
height
)
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
2f
,
false
,
true
);
}
return
;
}
if
(
texc
==
null
)
{
return
;
}
// float k = GameTextureManager.getK(data.Id, GameTextureType.card_feature);
refreshFunctions
.
Remove
(
SOH_sum
);
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShower
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
I
().
ui_main_2d
,
true
)
.
GetComponent
<
YGO1superShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
360
;
shower
.
closeup
.
width
=
(
int
)(
360
*
shower
.
closeup
.
mainTexture
.
width
/
shower
.
closeup
.
mainTexture
.
height
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
2f
,
false
,
true
);
}
private
void
SOH_nSum
()
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
View file @
e1aa4010
...
...
@@ -235,7 +235,7 @@ public class GameField : OCGobject
if
(
File
.
Exists
(
texturePath
))
{
Texture2D
textureField
=
UIHelper
.
getTexture2D
(
texturePath
);
Texture2D
[]
textureFieldSliced
=
UIHelper
.
s
liceField
(
textureField
);
Texture2D
[]
textureFieldSliced
=
UIHelper
.
S
liceField
(
textureField
);
SetFieldTextures
(
textureFieldSliced
);
}
else
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
e1aa4010
...
...
@@ -271,8 +271,6 @@ public class GameTextureManager
private
static
string
FindImagePath
(
PictureResource
pic
)
{
// ... (原代码中的路径查找逻辑,这里可以保持或优化)
// 为了清晰,我把它提取成了一个独立方法
string
path
=
""
;
switch
(
pic
.
type
)
{
...
...
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
e1aa4010
...
...
@@ -91,15 +91,16 @@ public class selectDeck : WindowServantSP
{
if
(((
DeckManager
)
Program
.
I
().
deckManager
).
deckDirty
)
{
RMSshow_yesOrNoOrCancle
(
"deckManager_returnAction"
,
InterString
.
Get
(
"要保存卡组的变更吗?"
)
,
new
messageSystemValue
{
hint
=
"yes"
,
value
=
"yes"
}
,
new
messageSystemValue
{
hint
=
"no"
,
value
=
"no"
}
,
new
messageSystemValue
{
hint
=
"cancle"
,
value
=
"cancle"
}
);
RMSshow_yesOrNoOrCancle
(
"deckManager_returnAction"
,
InterString
.
Get
(
"要保存卡组的变更吗?"
)
,
new
messageSystemValue
{
hint
=
"yes"
,
value
=
"yes"
}
,
new
messageSystemValue
{
hint
=
"no"
,
value
=
"no"
}
,
new
messageSystemValue
{
hint
=
"cancle"
,
value
=
"cancle"
}
);
}
else
{
else
{
Program
.
I
().
shiftToServant
(
Program
.
I
().
selectDeck
);
}
};
...
...
@@ -183,11 +184,12 @@ public class selectDeck : WindowServantSP
}
if
(
hashCode
==
"onCode"
)
{
if
(
result
[
0
].
value
!=
""
)
{
if
(
result
[
0
].
value
!=
""
)
{
try
{
YGOSharp
.
Deck
deck
;
if
(!
DeckManager
.
FromBase64toCodedDeck
(
result
[
0
].
value
,
out
deck
))
if
(!
DeckManager
.
FromBase64toCodedDeck
(
result
[
0
].
value
,
out
deck
))
{
RMSshow_none
(
InterString
.
Get
(
"卡组代码无效。"
));
return
;
...
...
@@ -285,23 +287,23 @@ public class selectDeck : WindowServantSP
string
path
=
"deck/"
+
superScrollView
.
selectedString
+
".ydk"
;
if
(
File
.
Exists
(
path
))
{
/*
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
System.Diagnostics.Process.Start("notepad.exe", path);
#elif UNITY_STANDALONE_OSX //Mac OS X
System.Diagnostics.Process.Start("open", "-e " + path);
#elif UNITY_STANDALONE_LINUX //Linux
System.Diagnostics.Process.Start("gedit", path);
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
jo.Call("openFile", Program.ANDROID_GAME_PATH + path);
//#elif UNITY_IPHONE //iPhone
#endif
*/
/*
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
System.Diagnostics.Process.Start("notepad.exe", path);
#elif UNITY_STANDALONE_OSX //Mac OS X
System.Diagnostics.Process.Start("open", "-e " + path);
#elif UNITY_STANDALONE_LINUX //Linux
System.Diagnostics.Process.Start("gedit", path);
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
jo.Call("openFile", Program.ANDROID_GAME_PATH + path);
//#elif UNITY_IPHONE //iPhone
#endif
*/
YGOSharp
.
Deck
deck
;
DeckManager
.
FromYDKtoCodedDeck
(
path
,
out
deck
);
string
default_string
;
if
(
deck
.
Main
.
Count
>
0
||
deck
.
Extra
.
Count
>
0
||
deck
.
Side
.
Count
>
0
)
if
(
deck
.
Main
.
Count
>
0
||
deck
.
Extra
.
Count
>
0
||
deck
.
Side
.
Count
>
0
)
default_string
=
DeckManager
.
convertDeckToBase64
(
deck
);
else
default_string
=
""
;
...
...
@@ -311,7 +313,7 @@ public class selectDeck : WindowServantSP
private
void
setSortLable
()
{
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
{
UIHelper
.
trySetLableText
(
gameObject
,
"sort_"
,
InterString
.
Get
(
"时间排序"
));
}
...
...
@@ -323,7 +325,7 @@ public class selectDeck : WindowServantSP
private
void
onSort
()
{
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
{
Config
.
Set
(
sort
,
"0"
);
}
...
...
@@ -367,7 +369,7 @@ public class selectDeck : WindowServantSP
int
extraXyz
=
0
;
int
currentIndex
=
0
;
int
[]
hangshu
=
UIHelper
.
get_decklieshu
Array
(
deck
.
Main
.
Count
);
int
[]
hangshu
=
UIHelper
.
GetDeckLayout
Array
(
deck
.
Main
.
Count
);
foreach
(
var
item
in
deck
.
Main
)
{
mainAll
++;
...
...
@@ -388,7 +390,7 @@ public class selectDeck : WindowServantSP
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
mainAll
-
1
,
hangshu
);
quickCards
[
currentIndex
].
transform
.
localPosition
=
new
Vector3
(
-
176.3f
+
UIHelper
.
get_left_right_indexZuo
(
0
,
352f
,
(
int
)
v
.
y
,
hangshu
[(
int
)
v
.
x
],
10
)
-
176.3f
+
UIHelper
.
get_left_right_indexZuo
(
0
,
352f
,
(
int
)
v
.
y
,
hangshu
[(
int
)
v
.
x
],
10
)
,
161.6f
-
v
.
x
*
60f
,
...
...
@@ -418,7 +420,7 @@ public class selectDeck : WindowServantSP
quickCards
[
currentIndex
].
reCode
(
item
);
quickCards
[
currentIndex
].
transform
.
localPosition
=
new
Vector3
(
-
176.3f
+
UIHelper
.
get_left_right_indexZuo
(
0
,
352f
,
sideAll
-
1
,
deck
.
Side
.
Count
,
10
)
-
176.3f
+
UIHelper
.
get_left_right_indexZuo
(
0
,
352f
,
sideAll
-
1
,
deck
.
Side
.
Count
,
10
)
,
-
181.1f
,
...
...
@@ -478,7 +480,7 @@ public class selectDeck : WindowServantSP
deckPanel
.
leftMain
.
text
=
GameStringHelper
.
_zhukazu
+
mainAll
;
deckPanel
.
leftExtra
.
text
=
GameStringHelper
.
_ewaikazu
+
extraAll
;
deckPanel
.
leftSide
.
text
=
GameStringHelper
.
_fukazu
+
sideAll
;
deckPanel
.
rightMain
.
text
=
GameStringHelper
.
_guaishou
+
mainMonster
+
" "
+
GameStringHelper
.
_mofa
+
mainSpell
+
" "
+
GameStringHelper
.
_xianjing
+
mainTrap
;
deckPanel
.
rightMain
.
text
=
GameStringHelper
.
_guaishou
+
mainMonster
+
" "
+
GameStringHelper
.
_mofa
+
mainSpell
+
" "
+
GameStringHelper
.
_xianjing
+
mainTrap
;
deckPanel
.
rightExtra
.
text
=
GameStringHelper
.
_ronghe
+
extraFusion
+
" "
+
GameStringHelper
.
_tongtiao
+
extraSync
+
" "
+
GameStringHelper
.
_chaoliang
+
extraXyz
+
" "
+
GameStringHelper
.
_lianjie
+
extraLink
;
deckPanel
.
rightSide
.
text
=
GameStringHelper
.
_guaishou
+
sideMonster
+
" "
+
GameStringHelper
.
_mofa
+
sideSpell
+
" "
+
GameStringHelper
.
_xianjing
+
sideTrap
;
}
...
...
@@ -502,15 +504,15 @@ public class selectDeck : WindowServantSP
Config
.
Set
(
"deckInUse"
,
superScrollView
.
selectedString
);
}
}
base
.
hide
();
base
.
hide
();
}
void
printFile
()
{
string
deckInUse
=
Config
.
Get
(
"deckInUse"
,
"miaowu"
);
string
deckInUse
=
Config
.
Get
(
"deckInUse"
,
"miaowu"
);
superScrollView
.
clear
();
FileInfo
[]
fileInfos
=
(
new
DirectoryInfo
(
"deck"
)).
GetFiles
();
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
{
Array
.
Sort
(
fileInfos
,
UIHelper
.
CompareTime
);
}
...
...
Assets/SibylSystem/Servant.cs
View file @
e1aa4010
...
...
@@ -293,6 +293,7 @@ public class Servant
public
void
SetBar
(
GameObject
mod
,
float
buttomToScreen
,
float
RightToScreen
)
{
// Debug.Log("SetBar buttomToScreen: " + buttomToScreen);
this
.
buttomToScreen
=
buttomToScreen
;
this
.
RightToScreen
=
RightToScreen
;
if
(
toolBar
!=
null
)
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
e1aa4010
...
...
@@ -2111,7 +2111,7 @@ public class DeckManager : ServantWithCardDescription
// 根据区域决定动画的交错延迟
float
staggerDelay
=
(
zone
==
CardZone
.
Main
)
?
0.015f
:
0.045f
;
int
[]
hangshu
=
(
zone
==
CardZone
.
Main
)
?
UIHelper
.
get_decklieshu
Array
(
cardIds
.
Count
)
:
null
;
int
[]
hangshu
=
(
zone
==
CardZone
.
Main
)
?
UIHelper
.
GetDeckLayout
Array
(
cardIds
.
Count
)
:
null
;
for
(
int
i
=
0
;
i
<
cardIds
.
Count
;
i
++)
{
...
...
@@ -2214,7 +2214,7 @@ public class DeckManager : ServantWithCardDescription
void
ShowObjectDeck
()
{
float
k
=
(
float
)(
1.5
*
0.1
/
0.130733633
);
int
[]
hangshu
=
UIHelper
.
get_decklieshu
Array
(
deck
.
IMain
.
Count
);
int
[]
hangshu
=
UIHelper
.
GetDeckLayout
Array
(
deck
.
IMain
.
Count
);
for
(
int
i
=
0
;
i
<
deck
.
IMain
.
Count
;
i
++)
{
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
i
,
hangshu
);
...
...
@@ -2332,11 +2332,13 @@ public class DeckManager : ServantWithCardDescription
Program
.
go
(
500
,
superScrollView
.
toTop
);
if
(
side
)
{
UIInput_search
.
enabled
=
false
;
UIInput_search
.
value
=
InterString
.
Get
(
"对手使用过的卡↓"
);
UIInput_search
.
isSelected
=
false
;
}
else
{
UIInput_search
.
enabled
=
true
;
UIInput_search
.
value
=
""
;
UIInput_search
.
isSelected
=
false
;
}
...
...
Assets/old/UiverseAssests/art_plugin/attack_light_line/ocgcore/mod_ocgcore_atk_fire.prefab
View file @
e1aa4010
...
...
@@ -25,7 +25,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
125240
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-0.
27
,
y
:
0
,
z
:
5.6
5
}
m_LocalPosition
:
{
x
:
-0.
32103002
,
y
:
0
,
z
:
6.7178
5
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_Children
:
...
...
@@ -4966,7 +4966,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
137080
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
6.217
,
y
:
0
,
z
:
-1.695
}
m_LocalPosition
:
{
x
:
-7.89496
,
y
:
0
,
z
:
-10.794931
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_Children
:
[]
...
...
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