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
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
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
nanahira
ygopro2
Commits
ff3fa082
Commit
ff3fa082
authored
Feb 09, 2019
by
Unicorn369
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java Test
parent
c3ebbf29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
13 deletions
+59
-13
Assets/Plugins/Android/Mylibrary-Test.aar
Assets/Plugins/Android/Mylibrary-Test.aar
+0
-0
Assets/Plugins/Android/Mylibrary-Test.meta
Assets/Plugins/Android/Mylibrary-Test.meta
+33
-0
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+23
-9
Assets/SibylSystem/SelectDeck/selectDeck.cs
Assets/SibylSystem/SelectDeck/selectDeck.cs
+3
-4
No files found.
Assets/Plugins/Android/Mylibrary-Test.aar
0 → 100644
View file @
ff3fa082
File added
Assets/Plugins/Android/Mylibrary-Test.meta
0 → 100644
View file @
ff3fa082
fileFormatVersion: 2
guid: 3e7316faecb66ab489c7d71f8991b1d5
timeCreated: 1549612020
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings: {}
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/Program.cs
View file @
ff3fa082
...
...
@@ -337,7 +337,7 @@ public class Program : MonoBehaviour
GameStringManager
.
initialize
(
"expansions/strings.conf"
);
}
YGOSharp
.
BanlistManager
.
initialize
(
"lflist.conf"
);
//YGOMobile Paths
YGOSharp
.
CardsManager
.
initialize
(
"cards.cdb"
);
YGOSharp
.
CardsManager
.
initialize
(
"cards.cdb"
);
//YGOMobile Paths
/*FileInfo[] fileInfos = (new DirectoryInfo("cdb")).GetFiles().OrderByDescending(x => x.Name).ToArray();
//FileInfo[] fileInfos = (new DirectoryInfo("cdb" + AppLanguage.LanguageDir())).GetFiles().OrderByDescending(x => x.Name).ToArray();//System Language
...
...
@@ -392,6 +392,20 @@ public class Program : MonoBehaviour
initializeALLservants
();
loadResources
();
#if UNITY_ANDROID //Android Java Test
if
(!
File
.
Exists
(
"updates/image_version1.0.txt"
))
//用于检查更新
{
if
(
File
.
Exists
(
"pics.zip"
))
//YGOMobile内置的卡图包
{
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.UnityAndroid"
);
jo
.
Call
(
"doZipExtractor"
,
"pics.zip"
,
"./"
);
File
.
Create
(
"updates/image_version1.0.txt"
);
}
else
{
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.UnityAndroid"
);
jo
.
Call
(
"doDownLoad"
,
"http://192.168.1.222:3690/pics.zip"
,
"./"
);
}
}
#endif
});
}
...
...
@@ -445,7 +459,6 @@ public class Program : MonoBehaviour
{
try
{
WWW
w
=
new
WWW
(
"https://api.github.com/repos/szefo09/updateYGOPro2/contents/"
);
while
(!
w
.
isDone
)
{
...
...
@@ -461,22 +474,22 @@ public class Program : MonoBehaviour
Directory
.
CreateDirectory
(
"updates"
);
toDownload
.
AddRange
(
apiFromGit
);
}
if
(
File
.
Exists
(
"updates/SHAs.txt"
))
{
List
<
ApiFile
>
local
=
new
System
.
Web
.
Script
.
Serialization
.
JavaScriptSerializer
().
Deserialize
<
List
<
ApiFile
>>(
File
.
ReadAllText
(
"updates/SHAs.txt"
));
foreach
(
ApiFile
file
in
apiFromGit
)
foreach
(
ApiFile
file
in
apiFromGit
)
{
if
(
file
.
sha
!=
local
.
FirstOrDefault
(
x
=>
x
.
name
==
file
.
name
).
sha
)
if
(
local
.
FirstOrDefault
(
x
=>
x
.
name
==
file
.
name
)==
null
||
file
.
sha
!=
local
.
FirstOrDefault
(
x
=>
x
.
name
==
file
.
name
).
sha
)
{
toDownload
.
Add
(
file
);
}
}
foreach
(
ApiFile
f
in
local
)
foreach
(
ApiFile
f
in
local
)
{
if
(
f
.
name
!=
apiFromGit
.
FirstOrDefault
(
x
=>
x
.
name
==
f
.
name
).
name
)
if
(
apiFromGit
.
FirstOrDefault
(
x
=>
x
.
name
==
f
.
name
)
==
null
||
f
.
name
!=
apiFromGit
.
FirstOrDefault
(
x
=>
x
.
name
==
f
.
name
).
name
)
{
if
(
File
.
Exists
(
"cdb/"
+
f
.
name
))
if
(
File
.
Exists
(
"cdb/"
+
f
.
name
))
{
File
.
Delete
(
"cdb/"
+
f
.
name
);
}
...
...
@@ -491,7 +504,7 @@ public class Program : MonoBehaviour
HttpDldFile
httpDldFile
=
new
HttpDldFile
();
foreach
(
var
dl
in
toDownload
)
{
if
(
Path
.
GetExtension
(
dl
.
name
)==
".cdb"
&&
!(
Application
.
internetReachability
==
NetworkReachability
.
NotReachable
))
if
(
Path
.
GetExtension
(
dl
.
name
)
==
".cdb"
&&
!(
Application
.
internetReachability
==
NetworkReachability
.
NotReachable
))
{
httpDldFile
.
Download
(
dl
.
download_url
,
Path
.
Combine
(
"cdb/"
,
dl
.
name
));
}
...
...
@@ -505,6 +518,7 @@ public class Program : MonoBehaviour
catch
(
Exception
e
)
{
Debug
.
Log
(
e
.
ToString
());
File
.
Delete
(
"updates/SHAs.txt"
);
}
}
...
...
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
ff3fa082
...
...
@@ -247,10 +247,9 @@ public class selectDeck : WindowServantSP
System
.
Diagnostics
.
Process
.
Start
(
"open"
,
"-e "
+
path
);
#elif UNITY_STANDALONE_LINUX //Linux
System
.
Diagnostics
.
Process
.
Start
(
"gedit"
,
path
);
//#elif UNITY_ANDROID //Android (Java)
// AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
// AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
// jo.Call("Open", path);
#elif UNITY_ANDROID //Android (Java)
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.UnityAndroid"
);
jo
.
Call
(
"showToast"
,
"暂不支持!以后再做唤醒编辑器打开"
);
//#elif UNITY_IPHONE //iPhone
#endif
}
...
...
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