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
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
...
@@ -171,70 +171,225 @@ public static class UIHelper
...
@@ -171,70 +171,225 @@ public static class UIHelper
}
}
}
}
internal
static
Texture2D
[]
sliceField
(
Texture2D
textureField_
)
// internal static Texture2D[] sliceField(Texture2D textureField_)
{
// {
Texture2D
textureField
=
ScaleTexture
(
textureField_
,
1024
,
819
);
// Texture2D textureField = ScaleTexture(textureField_, 1024, 819);
Texture2D
[]
returnValue
=
new
Texture2D
[
3
];
// Texture2D[] returnValue = new Texture2D[3];
returnValue
[
0
]
=
new
Texture2D
(
textureField
.
width
,
textureField
.
height
);
// returnValue[0] = new Texture2D(textureField.width, textureField.height);
returnValue
[
1
]
=
new
Texture2D
(
textureField
.
width
,
textureField
.
height
);
// returnValue[1] = new Texture2D(textureField.width, textureField.height);
returnValue
[
2
]
=
new
Texture2D
(
textureField
.
width
,
textureField
.
height
);
// returnValue[2] = new Texture2D(textureField.width, textureField.height);
float
zuo
=
(
float
)
textureField
.
width
*
69f
/
320f
;
// float zuo = (float)textureField.width * 69f / 320f;
float
you
=
(
float
)
textureField
.
width
*
247f
/
320f
;
// float you = (float)textureField.width * 247f / 320f;
for
(
int
w
=
0
;
w
<
textureField
.
width
;
w
++)
// for (int w = 0; w < textureField.width; w++)
{
// {
for
(
int
h
=
0
;
h
<
textureField
.
height
;
h
++)
// for (int h = 0; h < textureField.height; h++)
// {
// Color c = textureField.GetPixel(w, h);
// if (c.a < 0.05f)
// {
// c.a = 0;
// }
// if (w < zuo)
// {
// returnValue[0].SetPixel(w, h, c);
// returnValue[1].SetPixel(w, h, new Color(0, 0, 0, 0));
// returnValue[2].SetPixel(w, h, new Color(0, 0, 0, 0));
// }
// else if (w > you)
// {
// returnValue[2].SetPixel(w, h, c);
// returnValue[0].SetPixel(w, h, new Color(0, 0, 0, 0));
// returnValue[1].SetPixel(w, h, new Color(0, 0, 0, 0));
// }
// else
// {
// returnValue[1].SetPixel(w, h, c);
// returnValue[0].SetPixel(w, h, new Color(0, 0, 0, 0));
// returnValue[2].SetPixel(w, h, new Color(0, 0, 0, 0));
// }
// }
// }
// returnValue[0].Apply();
// returnValue[1].Apply();
// returnValue[2].Apply();
// return returnValue;
// }
// static Texture2D ScaleTexture(Texture2D source, int targetWidth, int targetHeight)
// {
// Texture2D result = new Texture2D(targetWidth, targetHeight, source.format, false);
// float incX = (1.0f / (float)targetWidth);
// float incY = (1.0f / (float)targetHeight);
// for (int i = 0; i < result.height; ++i)
// {
// for (int j = 0; j < result.width; ++j)
// {
// Color newColor = source.GetPixelBilinear((float)j / (float)result.width, (float)i / (float)result.height);
// result.SetPixel(j, i, newColor);
// }
// }
// result.Apply();
// return result;
// }
// 优化的纹理切片方法
public
static
Texture2D
[]
SliceField
(
Texture2D
textureField
)
{
if
(
textureField
==
null
)
return
null
;
var
scaledTexture
=
ScaleTexture
(
textureField
,
1024
,
819
);
if
(
scaledTexture
==
null
)
return
null
;
var
returnValue
=
new
Texture2D
[
3
];
var
width
=
scaledTexture
.
width
;
var
height
=
scaledTexture
.
height
;
try
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
{
Color
c
=
textureField
.
GetPixel
(
w
,
h
);
returnValue
[
i
]
=
new
Texture2D
(
width
,
height
,
TextureFormat
.
RGBA32
,
false
);
if
(
c
.
a
<
0.05f
)
}
{
c
.
a
=
0
;
var
pixels
=
scaledTexture
.
GetPixels
();
}
var
leftPixels
=
new
Color
[
pixels
.
Length
];
if
(
w
<
zuo
)
var
centerPixels
=
new
Color
[
pixels
.
Length
];
{
var
rightPixels
=
new
Color
[
pixels
.
Length
];
returnValue
[
0
].
SetPixel
(
w
,
h
,
c
);
returnValue
[
1
].
SetPixel
(
w
,
h
,
new
Color
(
0
,
0
,
0
,
0
));
float
leftBound
=
width
*
69f
/
320f
;
returnValue
[
2
].
SetPixel
(
w
,
h
,
new
Color
(
0
,
0
,
0
,
0
));
float
rightBound
=
width
*
247f
/
320f
;
}
else
if
(
w
>
you
)
for
(
int
y
=
0
;
y
<
height
;
y
++)
{
for
(
int
x
=
0
;
x
<
width
;
x
++)
{
{
returnValue
[
2
].
SetPixel
(
w
,
h
,
c
);
int
index
=
y
*
width
+
x
;
returnValue
[
0
].
SetPixel
(
w
,
h
,
new
Color
(
0
,
0
,
0
,
0
));
var
color
=
pixels
[
index
];
returnValue
[
1
].
SetPixel
(
w
,
h
,
new
Color
(
0
,
0
,
0
,
0
));
if
(
color
.
a
<
0.05f
)
color
.
a
=
0
;
var
transparentColor
=
Color
.
clear
;
if
(
x
<
leftBound
)
{
leftPixels
[
index
]
=
color
;
centerPixels
[
index
]
=
transparentColor
;
rightPixels
[
index
]
=
transparentColor
;
}
else
if
(
x
>
rightBound
)
{
leftPixels
[
index
]
=
transparentColor
;
centerPixels
[
index
]
=
transparentColor
;
rightPixels
[
index
]
=
color
;
}
else
{
leftPixels
[
index
]
=
transparentColor
;
centerPixels
[
index
]
=
color
;
rightPixels
[
index
]
=
transparentColor
;
}
}
}
else
}
returnValue
[
0
].
SetPixels
(
leftPixels
);
returnValue
[
1
].
SetPixels
(
centerPixels
);
returnValue
[
2
].
SetPixels
(
rightPixels
);
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
returnValue
[
i
].
Apply
();
}
}
catch
(
Exception
e
)
{
Debug
.
LogError
(
$"Error in SliceField:
{
e
.
Message
}
"
);
// 清理已创建的纹理
for
(
int
i
=
0
;
i
<
returnValue
.
Length
;
i
++)
{
if
(
returnValue
[
i
]
!=
null
)
{
{
returnValue
[
1
].
SetPixel
(
w
,
h
,
c
);
UnityEngine
.
Object
.
DestroyImmediate
(
returnValue
[
i
]);
returnValue
[
0
].
SetPixel
(
w
,
h
,
new
Color
(
0
,
0
,
0
,
0
));
returnValue
[
2
].
SetPixel
(
w
,
h
,
new
Color
(
0
,
0
,
0
,
0
));
}
}
}
}
return
null
;
}
finally
{
if
(
scaledTexture
!=
textureField
)
{
UnityEngine
.
Object
.
DestroyImmediate
(
scaledTexture
);
}
}
}
returnValue
[
0
].
Apply
();
returnValue
[
1
].
Apply
();
returnValue
[
2
].
Apply
();
return
returnValue
;
return
returnValue
;
}
}
static
Texture2D
ScaleTexture
(
Texture2D
source
,
int
targetWidth
,
int
targetHeight
)
// 优化的纹理缩放方法
private
static
Texture2D
ScaleTexture
(
Texture2D
source
,
int
targetWidth
,
int
targetHeight
)
{
{
Texture2D
result
=
new
Texture2D
(
targetWidth
,
targetHeight
,
source
.
format
,
false
)
;
if
(
source
==
null
)
return
null
;
float
incX
=
(
1.0f
/
(
float
)
targetWidth
);
if
(
source
.
width
==
targetWidth
&&
source
.
height
==
targetHeight
)
float
incY
=
(
1.0f
/
(
float
)
targetHeight
)
;
return
source
;
for
(
int
i
=
0
;
i
<
result
.
height
;
++
i
)
var
result
=
new
Texture2D
(
targetWidth
,
targetHeight
,
source
.
format
,
false
);
try
{
{
for
(
int
j
=
0
;
j
<
result
.
width
;
++
j
)
var
sourcePixels
=
source
.
GetPixels
();
var
targetPixels
=
new
Color
[
targetWidth
*
targetHeight
];
float
xRatio
=
(
float
)
source
.
width
/
targetWidth
;
float
yRatio
=
(
float
)
source
.
height
/
targetHeight
;
for
(
int
y
=
0
;
y
<
targetHeight
;
y
++)
{
{
Color
newColor
=
source
.
GetPixelBilinear
((
float
)
j
/
(
float
)
result
.
width
,
(
float
)
i
/
(
float
)
result
.
height
);
for
(
int
x
=
0
;
x
<
targetWidth
;
x
++)
result
.
SetPixel
(
j
,
i
,
newColor
);
{
float
sourceX
=
x
*
xRatio
;
float
sourceY
=
y
*
yRatio
;
targetPixels
[
y
*
targetWidth
+
x
]
=
GetBilinearPixel
(
sourcePixels
,
source
.
width
,
source
.
height
,
sourceX
,
sourceY
);
}
}
}
result
.
SetPixels
(
targetPixels
);
result
.
Apply
();
}
catch
(
Exception
e
)
{
Debug
.
LogError
(
$"Error in ScaleTexture:
{
e
.
Message
}
"
);
UnityEngine
.
Object
.
DestroyImmediate
(
result
);
return
null
;
}
}
result
.
Apply
();
return
result
;
return
result
;
}
}
private
static
Color
GetBilinearPixel
(
Color
[]
pixels
,
int
width
,
int
height
,
float
x
,
float
y
)
{
int
x1
=
Mathf
.
FloorToInt
(
x
);
int
y1
=
Mathf
.
FloorToInt
(
y
);
int
x2
=
Mathf
.
Min
(
x1
+
1
,
width
-
1
);
int
y2
=
Mathf
.
Min
(
y1
+
1
,
height
-
1
);
float
fx
=
x
-
x1
;
float
fy
=
y
-
y1
;
var
c1
=
pixels
[
y1
*
width
+
x1
];
var
c2
=
pixels
[
y1
*
width
+
x2
];
var
c3
=
pixels
[
y2
*
width
+
x1
];
var
c4
=
pixels
[
y2
*
width
+
x2
];
var
i1
=
Color
.
Lerp
(
c1
,
c2
,
fx
);
var
i2
=
Color
.
Lerp
(
c3
,
c4
,
fx
);
return
Color
.
Lerp
(
i1
,
i2
,
fy
);
}
internal
static
IntPtr
getPtrString
(
string
path
)
internal
static
IntPtr
getPtrString
(
string
path
)
{
{
...
@@ -318,24 +473,17 @@ public static class UIHelper
...
@@ -318,24 +473,17 @@ public static class UIHelper
return
return_value
;
return
return_value
;
}
}
internal
static
int
[]
get_decklieshu
Array
(
int
count
)
public
static
int
[]
GetDeckLayout
Array
(
int
count
)
{
{
int
[]
ret
=
new
int
[
4
];
var
result
=
new
int
[
4
]
{
10
,
10
,
10
,
10
};
ret
[
0
]
=
10
;
ret
[
1
]
=
10
;
ret
[
2
]
=
10
;
ret
[
3
]
=
10
;
for
(
int
i
=
41
;
i
<=
count
;
i
++)
for
(
int
i
=
41
;
i
<=
count
;
i
++)
{
{
int
index
=
i
%
4
;
int
index
=
(
i
-
1
)
%
4
;
index
--;
result
[
index
]++;
if
(
index
==
-
1
)
{
index
=
3
;
}
ret
[
index
]++;
}
}
return
ret
;
return
result
;
}
}
public
static
void
trySetLableText
(
GameObject
father
,
string
name
,
string
text
)
public
static
void
trySetLableText
(
GameObject
father
,
string
name
,
string
text
)
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
View file @
e1aa4010
...
@@ -2432,31 +2432,31 @@ public class gameCard : OCGobject
...
@@ -2432,31 +2432,31 @@ public class gameCard : OCGobject
{
{
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
texc
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_feature
);
Texture2D
texc
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_feature
);
if
(
tex
!
=
null
)
if
(
tex
=
=
null
)
{
{
if
(
texc
!=
null
)
return
;
{
}
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
if
(
texc
==
null
)
refreshFunctions
.
Remove
(
SOH_act
);
{
YGO1superShower
shower
=
create
(
return
;
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
);
}
}
}
// 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
()
private
void
SOH_nAct
()
...
@@ -2493,31 +2493,33 @@ public class gameCard : OCGobject
...
@@ -2493,31 +2493,33 @@ public class gameCard : OCGobject
{
{
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
texc
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_feature
);
Texture2D
texc
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_feature
);
if
(
tex
!
=
null
)
if
(
tex
=
=
null
)
{
{
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
=
(
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
);
}
}
}
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
()
private
void
SOH_nSum
()
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
View file @
e1aa4010
...
@@ -235,7 +235,7 @@ public class GameField : OCGobject
...
@@ -235,7 +235,7 @@ public class GameField : OCGobject
if
(
File
.
Exists
(
texturePath
))
if
(
File
.
Exists
(
texturePath
))
{
{
Texture2D
textureField
=
UIHelper
.
getTexture2D
(
texturePath
);
Texture2D
textureField
=
UIHelper
.
getTexture2D
(
texturePath
);
Texture2D
[]
textureFieldSliced
=
UIHelper
.
s
liceField
(
textureField
);
Texture2D
[]
textureFieldSliced
=
UIHelper
.
S
liceField
(
textureField
);
SetFieldTextures
(
textureFieldSliced
);
SetFieldTextures
(
textureFieldSliced
);
}
}
else
else
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
e1aa4010
...
@@ -271,8 +271,6 @@ public class GameTextureManager
...
@@ -271,8 +271,6 @@ public class GameTextureManager
private
static
string
FindImagePath
(
PictureResource
pic
)
private
static
string
FindImagePath
(
PictureResource
pic
)
{
{
// ... (原代码中的路径查找逻辑,这里可以保持或优化)
// 为了清晰,我把它提取成了一个独立方法
string
path
=
""
;
string
path
=
""
;
switch
(
pic
.
type
)
switch
(
pic
.
type
)
{
{
...
...
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
e1aa4010
...
@@ -91,15 +91,16 @@ public class selectDeck : WindowServantSP
...
@@ -91,15 +91,16 @@ public class selectDeck : WindowServantSP
{
{
if
(((
DeckManager
)
Program
.
I
().
deckManager
).
deckDirty
)
if
(((
DeckManager
)
Program
.
I
().
deckManager
).
deckDirty
)
{
{
RMSshow_yesOrNoOrCancle
(
RMSshow_yesOrNoOrCancle
(
"deckManager_returnAction"
"deckManager_returnAction"
,
InterString
.
Get
(
"要保存卡组的变更吗?"
)
,
InterString
.
Get
(
"要保存卡组的变更吗?"
)
,
new
messageSystemValue
{
hint
=
"yes"
,
value
=
"yes"
}
,
new
messageSystemValue
{
hint
=
"yes"
,
value
=
"yes"
}
,
new
messageSystemValue
{
hint
=
"no"
,
value
=
"no"
}
,
new
messageSystemValue
{
hint
=
"no"
,
value
=
"no"
}
,
new
messageSystemValue
{
hint
=
"cancle"
,
value
=
"cancle"
}
,
new
messageSystemValue
{
hint
=
"cancle"
,
value
=
"cancle"
}
);
);
}
}
else
{
else
{
Program
.
I
().
shiftToServant
(
Program
.
I
().
selectDeck
);
Program
.
I
().
shiftToServant
(
Program
.
I
().
selectDeck
);
}
}
};
};
...
@@ -183,11 +184,12 @@ public class selectDeck : WindowServantSP
...
@@ -183,11 +184,12 @@ public class selectDeck : WindowServantSP
}
}
if
(
hashCode
==
"onCode"
)
if
(
hashCode
==
"onCode"
)
{
{
if
(
result
[
0
].
value
!=
""
)
{
if
(
result
[
0
].
value
!=
""
)
{
try
try
{
{
YGOSharp
.
Deck
deck
;
YGOSharp
.
Deck
deck
;
if
(!
DeckManager
.
FromBase64toCodedDeck
(
result
[
0
].
value
,
out
deck
))
if
(!
DeckManager
.
FromBase64toCodedDeck
(
result
[
0
].
value
,
out
deck
))
{
{
RMSshow_none
(
InterString
.
Get
(
"卡组代码无效。"
));
RMSshow_none
(
InterString
.
Get
(
"卡组代码无效。"
));
return
;
return
;
...
@@ -285,23 +287,23 @@ public class selectDeck : WindowServantSP
...
@@ -285,23 +287,23 @@ public class selectDeck : WindowServantSP
string
path
=
"deck/"
+
superScrollView
.
selectedString
+
".ydk"
;
string
path
=
"deck/"
+
superScrollView
.
selectedString
+
".ydk"
;
if
(
File
.
Exists
(
path
))
if
(
File
.
Exists
(
path
))
{
{
/*
/*
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
System.Diagnostics.Process.Start("notepad.exe", path);
System.Diagnostics.Process.Start("notepad.exe", path);
#elif UNITY_STANDALONE_OSX //Mac OS X
#elif UNITY_STANDALONE_OSX //Mac OS X
System.Diagnostics.Process.Start("open", "-e " + path);
System.Diagnostics.Process.Start("open", "-e " + path);
#elif UNITY_STANDALONE_LINUX //Linux
#elif UNITY_STANDALONE_LINUX //Linux
System.Diagnostics.Process.Start("gedit", path);
System.Diagnostics.Process.Start("gedit", path);
#elif UNITY_ANDROID //Android
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
jo.Call("openFile", Program.ANDROID_GAME_PATH + path);
jo.Call("openFile", Program.ANDROID_GAME_PATH + path);
//#elif UNITY_IPHONE //iPhone
//#elif UNITY_IPHONE //iPhone
#endif
#endif
*/
*/
YGOSharp
.
Deck
deck
;
YGOSharp
.
Deck
deck
;
DeckManager
.
FromYDKtoCodedDeck
(
path
,
out
deck
);
DeckManager
.
FromYDKtoCodedDeck
(
path
,
out
deck
);
string
default_string
;
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
);
default_string
=
DeckManager
.
convertDeckToBase64
(
deck
);
else
else
default_string
=
""
;
default_string
=
""
;
...
@@ -311,7 +313,7 @@ public class selectDeck : WindowServantSP
...
@@ -311,7 +313,7 @@ public class selectDeck : WindowServantSP
private
void
setSortLable
()
private
void
setSortLable
()
{
{
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
{
{
UIHelper
.
trySetLableText
(
gameObject
,
"sort_"
,
InterString
.
Get
(
"时间排序"
));
UIHelper
.
trySetLableText
(
gameObject
,
"sort_"
,
InterString
.
Get
(
"时间排序"
));
}
}
...
@@ -323,7 +325,7 @@ public class selectDeck : WindowServantSP
...
@@ -323,7 +325,7 @@ public class selectDeck : WindowServantSP
private
void
onSort
()
private
void
onSort
()
{
{
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
{
{
Config
.
Set
(
sort
,
"0"
);
Config
.
Set
(
sort
,
"0"
);
}
}
...
@@ -367,7 +369,7 @@ public class selectDeck : WindowServantSP
...
@@ -367,7 +369,7 @@ public class selectDeck : WindowServantSP
int
extraXyz
=
0
;
int
extraXyz
=
0
;
int
currentIndex
=
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
)
foreach
(
var
item
in
deck
.
Main
)
{
{
mainAll
++;
mainAll
++;
...
@@ -388,7 +390,7 @@ public class selectDeck : WindowServantSP
...
@@ -388,7 +390,7 @@ public class selectDeck : WindowServantSP
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
mainAll
-
1
,
hangshu
);
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
mainAll
-
1
,
hangshu
);
quickCards
[
currentIndex
].
transform
.
localPosition
=
new
Vector3
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
161.6f
-
v
.
x
*
60f
,
,
...
@@ -418,7 +420,7 @@ public class selectDeck : WindowServantSP
...
@@ -418,7 +420,7 @@ public class selectDeck : WindowServantSP
quickCards
[
currentIndex
].
reCode
(
item
);
quickCards
[
currentIndex
].
reCode
(
item
);
quickCards
[
currentIndex
].
transform
.
localPosition
=
new
Vector3
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
-
181.1f
,
,
...
@@ -478,7 +480,7 @@ public class selectDeck : WindowServantSP
...
@@ -478,7 +480,7 @@ public class selectDeck : WindowServantSP
deckPanel
.
leftMain
.
text
=
GameStringHelper
.
_zhukazu
+
mainAll
;
deckPanel
.
leftMain
.
text
=
GameStringHelper
.
_zhukazu
+
mainAll
;
deckPanel
.
leftExtra
.
text
=
GameStringHelper
.
_ewaikazu
+
extraAll
;
deckPanel
.
leftExtra
.
text
=
GameStringHelper
.
_ewaikazu
+
extraAll
;
deckPanel
.
leftSide
.
text
=
GameStringHelper
.
_fukazu
+
sideAll
;
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
.
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
;
deckPanel
.
rightSide
.
text
=
GameStringHelper
.
_guaishou
+
sideMonster
+
" "
+
GameStringHelper
.
_mofa
+
sideSpell
+
" "
+
GameStringHelper
.
_xianjing
+
sideTrap
;
}
}
...
@@ -502,15 +504,15 @@ public class selectDeck : WindowServantSP
...
@@ -502,15 +504,15 @@ public class selectDeck : WindowServantSP
Config
.
Set
(
"deckInUse"
,
superScrollView
.
selectedString
);
Config
.
Set
(
"deckInUse"
,
superScrollView
.
selectedString
);
}
}
}
}
base
.
hide
();
base
.
hide
();
}
}
void
printFile
()
void
printFile
()
{
{
string
deckInUse
=
Config
.
Get
(
"deckInUse"
,
"miaowu"
);
string
deckInUse
=
Config
.
Get
(
"deckInUse"
,
"miaowu"
);
superScrollView
.
clear
();
superScrollView
.
clear
();
FileInfo
[]
fileInfos
=
(
new
DirectoryInfo
(
"deck"
)).
GetFiles
();
FileInfo
[]
fileInfos
=
(
new
DirectoryInfo
(
"deck"
)).
GetFiles
();
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
if
(
Config
.
Get
(
sort
,
"1"
)
==
"1"
)
{
{
Array
.
Sort
(
fileInfos
,
UIHelper
.
CompareTime
);
Array
.
Sort
(
fileInfos
,
UIHelper
.
CompareTime
);
}
}
...
...
Assets/SibylSystem/Servant.cs
View file @
e1aa4010
...
@@ -293,6 +293,7 @@ public class Servant
...
@@ -293,6 +293,7 @@ public class Servant
public
void
SetBar
(
GameObject
mod
,
float
buttomToScreen
,
float
RightToScreen
)
public
void
SetBar
(
GameObject
mod
,
float
buttomToScreen
,
float
RightToScreen
)
{
{
// Debug.Log("SetBar buttomToScreen: " + buttomToScreen);
this
.
buttomToScreen
=
buttomToScreen
;
this
.
buttomToScreen
=
buttomToScreen
;
this
.
RightToScreen
=
RightToScreen
;
this
.
RightToScreen
=
RightToScreen
;
if
(
toolBar
!=
null
)
if
(
toolBar
!=
null
)
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
e1aa4010
...
@@ -2111,7 +2111,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -2111,7 +2111,7 @@ public class DeckManager : ServantWithCardDescription
// 根据区域决定动画的交错延迟
// 根据区域决定动画的交错延迟
float
staggerDelay
=
(
zone
==
CardZone
.
Main
)
?
0.015f
:
0.045f
;
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
++)
for
(
int
i
=
0
;
i
<
cardIds
.
Count
;
i
++)
{
{
...
@@ -2214,7 +2214,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -2214,7 +2214,7 @@ public class DeckManager : ServantWithCardDescription
void
ShowObjectDeck
()
void
ShowObjectDeck
()
{
{
float
k
=
(
float
)(
1.5
*
0.1
/
0.130733633
);
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
++)
for
(
int
i
=
0
;
i
<
deck
.
IMain
.
Count
;
i
++)
{
{
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
i
,
hangshu
);
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
i
,
hangshu
);
...
@@ -2332,11 +2332,13 @@ public class DeckManager : ServantWithCardDescription
...
@@ -2332,11 +2332,13 @@ public class DeckManager : ServantWithCardDescription
Program
.
go
(
500
,
superScrollView
.
toTop
);
Program
.
go
(
500
,
superScrollView
.
toTop
);
if
(
side
)
if
(
side
)
{
{
UIInput_search
.
enabled
=
false
;
UIInput_search
.
value
=
InterString
.
Get
(
"对手使用过的卡↓"
);
UIInput_search
.
value
=
InterString
.
Get
(
"对手使用过的卡↓"
);
UIInput_search
.
isSelected
=
false
;
UIInput_search
.
isSelected
=
false
;
}
}
else
else
{
{
UIInput_search
.
enabled
=
true
;
UIInput_search
.
value
=
""
;
UIInput_search
.
value
=
""
;
UIInput_search
.
isSelected
=
false
;
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:
...
@@ -25,7 +25,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
125240
}
m_GameObject
:
{
fileID
:
125240
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
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_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
m_Children
:
...
@@ -4966,7 +4966,7 @@ Transform:
...
@@ -4966,7 +4966,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
137080
}
m_GameObject
:
{
fileID
:
137080
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
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_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
[]
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