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
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
Alexis_chen
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
Show 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
if
(
language
!=
"en-US"
&&
language
!=
"es-ES"
)
description
=
description
.
Replace
(
" "
,
"\u00A0"
);
description
=
description
.
Replace
(
"\r\n\r\n"
,
"\r\n"
);
return
description
;
}
...
...
Assets/Scripts/MDPro3/Managers/TextureManager.cs
View file @
b2f7cc1e
...
...
@@ -166,6 +166,28 @@ namespace MDPro3
else
if
(
File
.
Exists
(
"Art/"
+
code
.
ToString
()
+
".jpg"
))
path
=
"Art/"
+
code
.
ToString
()
+
".jpg"
;
else
{
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
=
$"art/
{
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
());
}
}
}
}
if
(
returenValue
==
null
)
{
foreach
(
var
zip
in
ZipManager
.
zips
)
{
...
...
@@ -184,7 +206,14 @@ namespace MDPro3
entry
.
Extract
(
stream
);
returenValue
.
LoadImage
(
stream
.
ToArray
());
var
card
=
CardsManager
.
Get
(
code
);
if
((
card
.
Type
&
(
uint
)
CardType
.
Pendulum
)
>
0
)
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
);
...
...
@@ -193,6 +222,7 @@ namespace MDPro3
}
}
}
}
if
(
returenValue
==
null
)
{
IEnumerator
ie
=
LoadFromFileAsync
(
path
);
...
...
@@ -218,7 +248,6 @@ namespace MDPro3
}
yield
return
returenValue
;
}
//loadingArt = false;
}
int
getCount
;
...
...
@@ -679,6 +708,22 @@ namespace MDPro3
var
height
=
Mathf
.
CeilToInt
(
cardPic
.
height
*
0.81f
);
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
)
{
...
...
ProjectSettings/ProjectSettings.asset
View file @
b2f7cc1e
...
...
@@ -134,8 +134,9 @@ PlayerSettings:
16:10:
1
16:9:
1
Others
:
1
bundleVersion
:
1.0.2
preloadedAssets
:
[]
bundleVersion
:
1.0.2.1
preloadedAssets
:
-
{
fileID
:
11400000
,
guid
:
5fb02d2098f52054b89ce4a9f63ba9ee
,
type
:
2
}
metroInputSource
:
0
wsaTransparentSwapchain
:
0
m_HolographicPauseOnTrackingLoss
:
1
...
...
@@ -529,7 +530,7 @@ PlayerSettings:
m_APIs
:
0b000000
m_Automatic
:
1
-
m_BuildTarget
:
WindowsStandaloneSupport
m_APIs
:
0
200000012000000150000000b
000000
m_APIs
:
0
b000000020000001200000015
000000
m_Automatic
:
0
m_BuildTargetVRSettings
:
-
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