Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
赤子奈落
YGOProUnity_V2
Commits
ab7b6822
Commit
ab7b6822
authored
Aug 22, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update picture loading
parent
a0c8e33c
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
167 additions
and
118 deletions
+167
-118
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
+25
-27
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+3
-1
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+139
-90
No files found.
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
View file @
ab7b6822
...
...
@@ -2,6 +2,7 @@
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
...
...
@@ -424,25 +425,15 @@ public class GameField : OCGobject
fieldCode
[
player
]
=
code
;
if
(
code
>
0
)
{
Texture2D
tex
;
if
(
File
.
Exists
(
"picture/field/"
+
code
.
ToString
()
+
".png"
))
{
tex
=
UIHelper
.
getTexture2D
(
"picture/field/"
+
code
.
ToString
()
+
".png"
);
}
else
if
(
File
.
Exists
(
"picture/field/"
+
code
.
ToString
()
+
".jpg"
))
{
tex
=
UIHelper
.
getTexture2D
(
"picture/field/"
+
code
.
ToString
()
+
".jpg"
);
}
else
{
tex
=
null
;
Texture2D
tex
=
null
;
bool
found
=
false
;
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
{
if
(
zip
.
Name
.
ToLower
().
EndsWith
(
"script.zip"
))
continue
;
foreach
(
string
file
in
zip
.
EntryFileNames
)
{
string
file1
=
file
.
ToLower
();
if
(
file1
.
EndsWith
(
code
.
ToString
()
+
".jpg"
)
&&
file1
.
Contains
(
"field"
))
if
(
Regex
.
IsMatch
(
file
.
ToLower
(),
"field/"
+
code
.
ToString
()
+
"\\.(jpg|png)$"
))
{
MemoryStream
ms
=
new
MemoryStream
();
ZipEntry
e
=
zip
[
file
];
...
...
@@ -456,6 +447,13 @@ public class GameField : OCGobject
if
(
found
)
break
;
}
if
(
tex
==
null
)
{
tex
=
UIHelper
.
getTexture2D
(
"picture/field/"
+
code
.
ToString
()
+
".png"
);
}
if
(
tex
==
null
)
{
tex
=
UIHelper
.
getTexture2D
(
"picture/field/"
+
code
.
ToString
()
+
".jpg"
);
}
if
(
tex
!=
null
)
{
...
...
Assets/SibylSystem/Program.cs
View file @
ab7b6822
...
...
@@ -324,6 +324,8 @@ public class Program : MonoBehaviour
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
{
if
(
zip
.
Name
.
ToLower
().
EndsWith
(
"script.zip"
))
continue
;
foreach
(
string
file
in
zip
.
EntryFileNames
)
{
if
(
file
.
ToLower
().
EndsWith
(
".conf"
))
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
ab7b6822
This diff is collapsed.
Click to expand it.
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