Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
34
Issues
34
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
赤子奈落
MDPro3
Commits
b2f7cc1e
Commit
b2f7cc1e
authored
Apr 03, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better support for rush duel
parent
fe3fe796
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
10 deletions
+58
-10
Assets/Plugins/YGO Classes/libocgcore.so
Assets/Plugins/YGO Classes/libocgcore.so
+0
-0
Assets/Scripts/MDPro3/CardRenderer.cs
Assets/Scripts/MDPro3/CardRenderer.cs
+2
-0
Assets/Scripts/MDPro3/Managers/TextureManager.cs
Assets/Scripts/MDPro3/Managers/TextureManager.cs
+52
-7
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+4
-3
No files found.
Assets/Plugins/YGO Classes/libocgcore.so
View file @
b2f7cc1e
No preview for this file type
Assets/Scripts/MDPro3/CardRenderer.cs
View file @
b2f7cc1e
...
@@ -523,6 +523,8 @@ namespace MDPro3
...
@@ -523,6 +523,8 @@ namespace MDPro3
if
(
language
!=
"en-US"
&&
language
!=
"es-ES"
)
if
(
language
!=
"en-US"
&&
language
!=
"es-ES"
)
description
=
description
.
Replace
(
" "
,
"\u00A0"
);
description
=
description
.
Replace
(
" "
,
"\u00A0"
);
description
=
description
.
Replace
(
"\r\n\r\n"
,
"\r\n"
);
return
description
;
return
description
;
}
}
...
...
Assets/Scripts/MDPro3/Managers/TextureManager.cs
View file @
b2f7cc1e
...
@@ -175,7 +175,7 @@ namespace MDPro3
...
@@ -175,7 +175,7 @@ namespace MDPro3
{
{
foreach
(
var
extName
in
new
[]
{
".png"
,
".jpg"
})
foreach
(
var
extName
in
new
[]
{
".png"
,
".jpg"
})
{
{
var
picPath
=
$"
pics
/
{
code
}{
extName
}
"
;
var
picPath
=
$"
art
/
{
code
}{
extName
}
"
;
if
(
file
.
ToLower
()
==
picPath
)
if
(
file
.
ToLower
()
==
picPath
)
{
{
returenValue
=
new
Texture2D
(
0
,
0
);
returenValue
=
new
Texture2D
(
0
,
0
);
...
@@ -183,11 +183,41 @@ namespace MDPro3
...
@@ -183,11 +183,41 @@ namespace MDPro3
var
entry
=
zip
[
picPath
];
var
entry
=
zip
[
picPath
];
entry
.
Extract
(
stream
);
entry
.
Extract
(
stream
);
returenValue
.
LoadImage
(
stream
.
ToArray
());
returenValue
.
LoadImage
(
stream
.
ToArray
());
var
card
=
CardsManager
.
Get
(
code
);
}
if
((
card
.
Type
&
(
uint
)
CardType
.
Pendulum
)
>
0
)
}
returenValue
=
GetArtFromPendulumCard
(
returenValue
);
}
else
}
returenValue
=
GetArtFromCard
(
returenValue
);
if
(
returenValue
==
null
)
{
foreach
(
var
zip
in
ZipManager
.
zips
)
{
if
(
zip
.
Name
.
ToLower
().
EndsWith
(
"script.zip"
))
continue
;
foreach
(
var
file
in
zip
.
EntryFileNames
)
{
foreach
(
var
extName
in
new
[]
{
".png"
,
".jpg"
})
{
var
picPath
=
$"pics/
{
code
}{
extName
}
"
;
if
(
file
.
ToLower
()
==
picPath
)
{
returenValue
=
new
Texture2D
(
0
,
0
);
MemoryStream
stream
=
new
MemoryStream
();
var
entry
=
zip
[
picPath
];
entry
.
Extract
(
stream
);
returenValue
.
LoadImage
(
stream
.
ToArray
());
var
card
=
CardsManager
.
Get
(
code
);
if
(
code
>=
120000000
&&
code
<
130000000
)
{
if
((
card
.
Type
&
(
uint
)
CardType
.
Monster
)
>
0
)
returenValue
=
GetArtFromRushDuelMonsterCard
(
returenValue
);
else
returenValue
=
GetArtFromRushDuelSpellCard
(
returenValue
);
}
else
if
((
card
.
Type
&
(
uint
)
CardType
.
Pendulum
)
>
0
)
returenValue
=
GetArtFromPendulumCard
(
returenValue
);
else
returenValue
=
GetArtFromCard
(
returenValue
);
}
}
}
}
}
}
}
...
@@ -218,7 +248,6 @@ namespace MDPro3
...
@@ -218,7 +248,6 @@ namespace MDPro3
}
}
yield
return
returenValue
;
yield
return
returenValue
;
}
}
//loadingArt = false;
}
}
int
getCount
;
int
getCount
;
...
@@ -679,6 +708,22 @@ namespace MDPro3
...
@@ -679,6 +708,22 @@ namespace MDPro3
var
height
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.81f
);
var
height
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.81f
);
return
GetCroppingTex
(
cardPic
,
startX
,
startY
,
width
,
height
);
return
GetCroppingTex
(
cardPic
,
startX
,
startY
,
width
,
height
);
}
}
public
static
Texture2D
GetArtFromRushDuelMonsterCard
(
Texture2D
cardPic
)
{
var
startX
=
Mathf
.
CeilToInt
(
cardPic
.
width
*
0.067f
);
var
startY
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.29f
);
var
width
=
Mathf
.
CeilToInt
(
cardPic
.
width
*
0.933f
);
var
height
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.90f
);
return
GetCroppingTex
(
cardPic
,
startX
,
startY
,
width
,
height
);
}
public
static
Texture2D
GetArtFromRushDuelSpellCard
(
Texture2D
cardPic
)
{
var
startX
=
Mathf
.
CeilToInt
(
cardPic
.
width
*
0.067f
);
var
startY
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.29f
);
var
width
=
Mathf
.
CeilToInt
(
cardPic
.
width
*
0.933f
);
var
height
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.90f
);
return
GetCroppingTex
(
cardPic
,
startX
,
startY
,
width
,
height
);
}
public
static
Texture2D
GetCroppingTex
(
Texture2D
texture
,
int
startX
,
int
startY
,
int
width
,
int
height
)
public
static
Texture2D
GetCroppingTex
(
Texture2D
texture
,
int
startX
,
int
startY
,
int
width
,
int
height
)
{
{
...
...
ProjectSettings/ProjectSettings.asset
View file @
b2f7cc1e
...
@@ -134,8 +134,9 @@ PlayerSettings:
...
@@ -134,8 +134,9 @@ PlayerSettings:
16:10:
1
16:10:
1
16:9:
1
16:9:
1
Others
:
1
Others
:
1
bundleVersion
:
1.0.2
bundleVersion
:
1.0.2.1
preloadedAssets
:
[]
preloadedAssets
:
-
{
fileID
:
11400000
,
guid
:
5fb02d2098f52054b89ce4a9f63ba9ee
,
type
:
2
}
metroInputSource
:
0
metroInputSource
:
0
wsaTransparentSwapchain
:
0
wsaTransparentSwapchain
:
0
m_HolographicPauseOnTrackingLoss
:
1
m_HolographicPauseOnTrackingLoss
:
1
...
@@ -529,7 +530,7 @@ PlayerSettings:
...
@@ -529,7 +530,7 @@ PlayerSettings:
m_APIs
:
0b000000
m_APIs
:
0b000000
m_Automatic
:
1
m_Automatic
:
1
-
m_BuildTarget
:
WindowsStandaloneSupport
-
m_BuildTarget
:
WindowsStandaloneSupport
m_APIs
:
0
200000012000000150000000b
000000
m_APIs
:
0
b000000020000001200000015
000000
m_Automatic
:
0
m_Automatic
:
0
m_BuildTargetVRSettings
:
m_BuildTargetVRSettings
:
-
m_BuildTarget
:
Standalone
-
m_BuildTarget
:
Standalone
...
...
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