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
458e7cba
Commit
458e7cba
authored
Mar 03, 2019
by
Unicorn369
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
6d424f0e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
16 deletions
+23
-16
Assets/Plugins/Android/library-release.aar
Assets/Plugins/Android/library-release.aar
+0
-0
Assets/SibylSystem/Menu/Menu.cs
Assets/SibylSystem/Menu/Menu.cs
+6
-3
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+14
-10
Assets/SibylSystem/SelectDeck/selectDeck.cs
Assets/SibylSystem/SelectDeck/selectDeck.cs
+2
-2
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+1
-1
No files found.
Assets/Plugins/Android/library-release.aar
View file @
458e7cba
No preview for this file type
Assets/SibylSystem/Menu/Menu.cs
View file @
458e7cba
...
...
@@ -144,9 +144,12 @@ public class Menu : WindowServantSP
Application
.
OpenURL
(
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip"
);
#elif UNITY_ANDROID //Android
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.API"
);
if
(!
File
.
Exists
(
"updates/closeup_version1.0.txt"
))
//用于检查更新
{
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip"
);
//下载并解压
if
(!
File
.
Exists
(
"updates/closeup_version1.0.txt"
))
{
//用于检查更新
if
(
File
.
Exists
(
"closeup_version1.0.zip"
))
{
//如果有则直接解压
jo
.
Call
(
"doExtractZipFile"
,
"closeup_version1.0.zip"
,
Program
.
ANDROID_GAME_PATH
);
}
else
{
//否则下载并解压,锁定目录:/ygopro2
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.0.zip"
);
}
}
else
{
jo
.
Call
(
"showToast"
,
"已下载,无需再次下载!"
);
}
...
...
Assets/SibylSystem/Program.cs
View file @
458e7cba
...
...
@@ -275,7 +275,7 @@ public class Program : MonoBehaviour
public
static
float
verticleScale
=
5f
;
//YGOMobile Paths (https://github.com/Unicorn369/YGOPro2_Droid)
public
static
string
A
ndroid_Path
=
"/storage/emulated/0/ygopro2/"
;
public
static
string
A
NDROID_GAME_PATH
=
"/storage/emulated/0/ygopro2/"
;
void
initialize
()
{
...
...
@@ -285,18 +285,18 @@ public class Program : MonoBehaviour
#elif UNITY_ANDROID //Android
Screen
.
sleepTimeout
=
SleepTimeout
.
NeverSleep
;
if
(!
File
.
Exists
(
Android_Path
+
"updates/version1.0.txt"
))
if
(!
File
.
Exists
(
ANDROID_GAME_PATH
+
"updates/version1.0.txt"
))
{
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygocore.zip"
;
var
www
=
new
WWW
(
filePath
);
while
(!
www
.
isDone
)
{
}
byte
[]
bytes
=
www
.
bytes
;
ExtractZipFile
(
bytes
,
A
ndroid_Path
);
//File.Create(
GamePaths
+ ".nomedia");
ExtractZipFile
(
bytes
,
A
NDROID_GAME_PATH
);
//File.Create(
ANDROID_GAME_PATH
+ ".nomedia");
}
Environment
.
CurrentDirectory
=
Android_Path
;
System
.
IO
.
Directory
.
SetCurrentDirectory
(
Android_Path
);
Environment
.
CurrentDirectory
=
ANDROID_GAME_PATH
;
System
.
IO
.
Directory
.
SetCurrentDirectory
(
ANDROID_GAME_PATH
);
#elif UNITY_IPHONE //iPhone
string
GamePaths
=
Application
.
persistentDataPath
+
"/ygopro2/"
;
if
(!
File
.
Exists
(
GamePaths
+
"updates/version1.0.txt"
))
...
...
@@ -385,10 +385,14 @@ public class Program : MonoBehaviour
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.API"
);
if
(!
File
.
Exists
(
"updates/image_version1.0.txt"
))
//用于检查更新
{
if
(
File
.
Exists
(
"pics.zip"
))
//YGOMobile内置的卡图包
{
jo
.
Call
(
"doExtractZipFile"
,
"pics.zip"
,
"./"
);
if
(
File
.
Exists
(
"pics.zip"
))
{
jo
.
Call
(
"doExtractZipFile"
,
"pics.zip"
,
ANDROID_GAME_PATH
);
File
.
Create
(
"updates/image_version1.0.txt"
);
}
else
if
(
File
.
Exists
(
"/storage/emulated/0/ygocore/pics.zip"
))
{
//YGOMobile内置的卡图包
jo
.
Call
(
"doExtractZipFile"
,
"/storage/emulated/0/ygocore/pics.zip"
,
ANDROID_GAME_PATH
);
File
.
Create
(
"updates/image_version1.0.txt"
);
}
else
{
jo
.
Call
(
"showToast"
,
"没有发现卡图包,是否未安装YGOMobile"
);
}
}
#endif
...
...
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
458e7cba
...
...
@@ -247,9 +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
(https://github.com/Unicorn369/Unity_Android_Library)
#elif UNITY_ANDROID //Android
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.API"
);
jo
.
Call
(
"openFile"
,
Program
.
A
ndroid_Path
+
path
);
jo
.
Call
(
"openFile"
,
Program
.
A
NDROID_GAME_PATH
+
path
);
//#elif UNITY_IPHONE //iPhone
#endif
}
...
...
ProjectSettings/ProjectSettings.asset
View file @
458e7cba
...
...
@@ -141,7 +141,7 @@ PlayerSettings:
protectGraphicsMemory
:
0
useHDRDisplay
:
0
applicationIdentifier
:
Android
:
c
n
.ygopro2.ygopro2android
Android
:
c
om
.ygopro2.ygopro2android
Standalone
:
cn.ygopro2.ygopro2android
Tizen
:
cn.ygopro2.ygopro2android
iOS
:
cn.ygopro2.ygopro2android
...
...
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