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
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
mercury233
ygopro2
Commits
065f88da
Commit
065f88da
authored
Mar 11, 2019
by
Unicorn369
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Unity5.6.7f1
parent
ff10f957
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1079 additions
and
724 deletions
+1079
-724
AI_core_vs2017solution/build/gmake.linux/Makefile
AI_core_vs2017solution/build/gmake.linux/Makefile
+1
-7
AI_core_vs2017solution/build/gmake.linux/sqlite3.make
AI_core_vs2017solution/build/gmake.linux/sqlite3.make
+0
-132
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+26
-5
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+321
-318
Assets/SibylSystem/ResourceManagers/HttpDldFile.cs
Assets/SibylSystem/ResourceManagers/HttpDldFile.cs
+47
-14
Assets/SibylSystem/Room/RoomList.cs
Assets/SibylSystem/Room/RoomList.cs
+10
-22
Assets/SibylSystem/Setting/Setting.cs
Assets/SibylSystem/Setting/Setting.cs
+19
-0
Assets/StreamingAssets/null.png
Assets/StreamingAssets/null.png
+0
-0
Assets/StreamingAssets/null.png.meta
Assets/StreamingAssets/null.png.meta
+0
-8
Assets/StreamingAssets/ygopro2.zip
Assets/StreamingAssets/ygopro2.zip
+0
-0
Assets/StreamingAssets/ygopro2.zip.meta
Assets/StreamingAssets/ygopro2.zip.meta
+0
-0
Assets/transUI/prefab/trans_selectDeck.prefab
Assets/transUI/prefab/trans_selectDeck.prefab
+161
-161
Assets/transUI/prefab/trans_setting.prefab
Assets/transUI/prefab/trans_setting.prefab
+491
-54
ProjectSettings/ProjectVersion.txt
ProjectSettings/ProjectVersion.txt
+1
-1
README.md
README.md
+2
-2
No files found.
AI_core_vs2017solution/build/gmake.linux/Makefile
View file @
065f88da
...
...
@@ -6,22 +6,17 @@ ifndef config
endif
export
config
PROJECTS
:=
sqlite3
ocgcore
PROJECTS
:=
ocgcore
.PHONY
:
all clean help $(PROJECTS)
all
:
$(PROJECTS)
sqlite3
:
@
echo
"==== Building sqlite3 (
$(config)
) ===="
@
${MAKE}
--no-print-directory
-C
.
-f
sqlite3.make
ocgcore
:
@
echo
"==== Building ocgcore (
$(config)
) ===="
@
${MAKE}
--no-print-directory
-C
.
-f
ocgcore.make
clean
:
@
${MAKE}
--no-print-directory
-C
.
-f
sqlite3.make clean
@
${MAKE}
--no-print-directory
-C
.
-f
ocgcore.make clean
help
:
...
...
@@ -34,7 +29,6 @@ help:
@
echo
"TARGETS:"
@
echo
" all (default)"
@
echo
" clean"
@
echo
" sqlite3"
@
echo
" ocgcore"
@
echo
""
@
echo
"For more information, see http://industriousone.com/premake/quick-start"
AI_core_vs2017solution/build/gmake.linux/sqlite3.make
deleted
100644 → 0
View file @
ff10f957
# GNU Make project makefile autogenerated by Premake
ifndef
config
config
=
release
endif
ifndef
verbose
SILENT
=
@
endif
ifndef
CC
CC
=
gcc
endif
ifndef
CXX
CXX
=
g++
endif
ifndef
AR
AR
=
ar
endif
ifeq
($(config),release)
OBJDIR
=
../../obj/Linux/x86_64/sqlite3
TARGETDIR
=
../../bin/x86_64
TARGET
=
$(TARGETDIR)
/libsqlite3.so
DEFINES
+=
-DLUA_USE_LINUX
INCLUDES
+=
CPPFLAGS
+=
-MMD
-MP
$(DEFINES)
$(INCLUDES)
CFLAGS
+=
$(CPPFLAGS)
$(ARCH)
-Os
-fPIC
-fno-strict-aliasing
-Wno-multichar
CXXFLAGS
+=
$(CFLAGS)
LDFLAGS
+=
-s
-shared
LIBS
+=
RESFLAGS
+=
$(DEFINES)
$(INCLUDES)
LDDEPS
+=
LINKCMD
=
$(CXX)
-o
$(TARGET)
$(OBJECTS)
$(LDFLAGS)
$(RESOURCES)
$(ARCH)
$(LIBS)
define
PREBUILDCMDS
endef
define
PRELINKCMDS
endef
define
POSTBUILDCMDS
endef
endif
ifeq
($(config),release32)
OBJDIR
=
../../obj/Linux/x86/sqlite3
TARGETDIR
=
../../bin/x86
TARGET
=
$(TARGETDIR)
/libsqlite3.so
DEFINES
+=
-DLUA_USE_LINUX
INCLUDES
+=
CPPFLAGS
+=
-MMD
-MP
$(DEFINES)
$(INCLUDES)
CFLAGS
+=
$(CPPFLAGS)
$(ARCH)
-Os
-m32
-fPIC
-fno-strict-aliasing
-Wno-multichar
CXXFLAGS
+=
$(CFLAGS)
LDFLAGS
+=
-s
-shared
-m32
-L
/usr/lib32
LIBS
+=
RESFLAGS
+=
$(DEFINES)
$(INCLUDES)
LDDEPS
+=
LINKCMD
=
$(CXX)
-o
$(TARGET)
$(OBJECTS)
$(LDFLAGS)
$(RESOURCES)
$(ARCH)
$(LIBS)
define
PREBUILDCMDS
endef
define
PRELINKCMDS
endef
define
POSTBUILDCMDS
endef
endif
OBJECTS
:=
\
$(OBJDIR)
/sqlite3.o
\
RESOURCES
:=
\
SHELLTYPE
:=
msdos
ifeq
(,$(ComSpec)$(COMSPEC))
SHELLTYPE
:=
posix
endif
ifeq
(/bin,$(findstring /bin,$(SHELL)))
SHELLTYPE
:=
posix
endif
.PHONY
:
clean prebuild prelink
all
:
$(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
@
:
$(TARGET)
:
$(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)
@
echo
Linking sqlite3
$(SILENT)
$(LINKCMD)
$(POSTBUILDCMDS)
$(TARGETDIR)
:
@
echo
Creating
$(TARGETDIR)
ifeq
(posix,$(SHELLTYPE))
$(SILENT)
mkdir
-p
$(TARGETDIR)
else
$(SILENT)
mkdir
$(
subst
/,
\\
,
$(TARGETDIR)
)
endif
$(OBJDIR)
:
@
echo
Creating
$(OBJDIR)
ifeq
(posix,$(SHELLTYPE))
$(SILENT)
mkdir
-p
$(OBJDIR)
else
$(SILENT)
mkdir
$(
subst
/,
\\
,
$(OBJDIR)
)
endif
clean
:
@
echo
Cleaning sqlite3
ifeq
(posix,$(SHELLTYPE))
$(SILENT)
rm
-f
$(TARGET)
$(SILENT)
rm
-rf
$(OBJDIR)
else
$(SILENT)
if
exist
$(
subst
/,
\\
,
$(TARGET)
)
del
$(
subst
/,
\\
,
$(TARGET)
)
$(SILENT)
if
exist
$(
subst
/,
\\
,
$(OBJDIR)
)
rmdir
/s /q
$(
subst
/,
\\
,
$(OBJDIR)
)
endif
prebuild
:
$(PREBUILDCMDS)
prelink
:
$(PRELINKCMDS)
ifneq
(,$(PCH))
$(GCH)
:
$(PCH)
@
echo
$(
notdir
$<
)
-
$(SILENT)
cp
$<
$(OBJDIR)
$(SILENT)
$(CXX)
$(CXXFLAGS)
-o
"
$@
"
-c
"
$<
"
endif
$(OBJDIR)/sqlite3.o
:
../../ocgcore/sqlite3.c
@
echo
$(
notdir
$<
)
$(SILENT)
$(CC)
$(CFLAGS)
-o
"
$@
"
-c
"
$<
"
-include
$(OBJECTS:%.o=%.d)
Assets/SibylSystem/Program.cs
View file @
065f88da
...
...
@@ -287,7 +287,7 @@ public class Program : MonoBehaviour
Screen
.
sleepTimeout
=
SleepTimeout
.
NeverSleep
;
if
(!
File
.
Exists
(
ANDROID_GAME_PATH
+
"updates/version1.0.txt"
))
{
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygo
core
.zip"
;
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygo
pro2
.zip"
;
var
www
=
new
WWW
(
filePath
);
while
(!
www
.
isDone
)
{
}
byte
[]
bytes
=
www
.
bytes
;
...
...
@@ -301,7 +301,7 @@ public class Program : MonoBehaviour
string
GamePaths
=
Application
.
persistentDataPath
+
"/ygopro2/"
;
if
(!
File
.
Exists
(
GamePaths
+
"updates/version1.0.txt"
))
{
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygo
core
.zip"
;
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygo
pro2
.zip"
;
var
www
=
new
WWW
(
filePath
);
while
(!
www
.
isDone
)
{
}
byte
[]
bytes
=
www
.
bytes
;
...
...
@@ -995,6 +995,14 @@ public class Program : MonoBehaviour
#
region
MonoBehaviors
private
float
LastUpdateShowTime
=
0f
;
private
float
UpdateShowDeltaTime
=
1f
;
//更新帧率
private
int
FrameUpdate
=
0
;
private
float
m_FPS
=
0
;
void
Start
()
{
#
if
UNITY_EDITOR
||
UNITY_STANDALONE_WIN
//编译器、Windows
...
...
@@ -1013,6 +1021,8 @@ public class Program : MonoBehaviour
instance
=
this
;
initialize
();
go
(
500
,
()
=>
{
gameStart
();
});
LastUpdateShowTime
=
Time
.
realtimeSinceStartup
;
}
int
preWid
=
0
;
...
...
@@ -1023,15 +1033,26 @@ public class Program : MonoBehaviour
void
OnGUI
()
{
if
(
Event
.
current
.
type
==
EventType
.
ScrollWheel
)
if
(
Event
.
current
.
type
==
EventType
.
ScrollWheel
)
{
_padScroll
=
-
Event
.
current
.
delta
.
y
/
100
;
else
}
else
{
_padScroll
=
0
;
}
//GUI.Label(new Rect(Screen.width / 2, 0, 100, 100), "FPS: " + m_FPS);
GUI
.
Label
(
new
Rect
(
10
,
5
,
100
,
100
),
"FPS: "
+
m_FPS
);
}
void
Update
()
{
FrameUpdate
++;
if
(
Time
.
realtimeSinceStartup
-
LastUpdateShowTime
>=
UpdateShowDeltaTime
)
{
m_FPS
=
FrameUpdate
/
(
Time
.
realtimeSinceStartup
-
LastUpdateShowTime
);
FrameUpdate
=
0
;
LastUpdateShowTime
=
Time
.
realtimeSinceStartup
;
}
if
(
preWid
!=
Screen
.
width
||
preheight
!=
Screen
.
height
)
{
Resources
.
UnloadUnusedAssets
();
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
065f88da
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/ResourceManagers/HttpDldFile.cs
View file @
065f88da
...
...
@@ -10,25 +10,34 @@ using UnityEngine;
public
class
HttpDldFile
{
private
readonly
System
.
Threading
.
Semaphore
semaphore
=
new
System
.
Threading
.
Semaphore
(
6
,
6
);
public
bool
Download
(
string
url
,
string
filename
)
{
bool
flag
=
false
;
try
{
if
(!
Directory
.
Exists
(
Path
.
GetDirectoryName
(
filename
))){
Directory
.
CreateDirectory
(
Path
.
GetDirectoryName
(
filename
));
}
using
(
var
client
=
new
WebClient
())
{
ServicePointManager
.
ServerCertificateValidationCallback
=
MyRemoteCertificateValidationCallback
;
//client.Headers.Add(HttpRequestHeader.Authorization, string.Concat("token ", RepoData.GetToken()));
client
.
Headers
.
Add
(
HttpRequestHeader
.
ContentType
,
"application/x-www-form-urlencoded; charset=UTF-8"
);
client
.
Headers
.
Add
(
HttpRequestHeader
.
UserAgent
,
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063"
);
client
.
DownloadFile
(
new
Uri
(
url
),
filename
+
".tmp"
);
}
flag
=
true
;
if
(
File
.
Exists
(
filename
))
if
(!
Directory
.
Exists
(
Path
.
GetDirectoryName
(
filename
)))
{
Directory
.
CreateDirectory
(
Path
.
GetDirectoryName
(
filename
));
}
using
(
var
client
=
new
TimeoutWebClient
())
{
ServicePointManager
.
ServerCertificateValidationCallback
=
MyRemoteCertificateValidationCallback
;
if
(
Path
.
GetExtension
(
filename
).
Contains
(
"png"
))
{
client
.
Timeout
=
6500
;
}
if
(
Path
.
GetExtension
(
filename
).
Contains
(
"jpg"
))
{
client
.
Timeout
=
3500
;
}
semaphore
.
WaitOne
();
client
.
DownloadFile
(
new
Uri
(
url
),
filename
+
".tmp"
);
}
flag
=
true
;
if
(
File
.
Exists
(
filename
))
{
File
.
Delete
(
filename
);
}
...
...
@@ -38,6 +47,10 @@ public class HttpDldFile
{
flag
=
false
;
}
finally
{
semaphore
.
Release
();
}
return
flag
;
}
public
static
bool
MyRemoteCertificateValidationCallback
(
System
.
Object
sender
,
...
...
@@ -68,5 +81,25 @@ public class HttpDldFile
}
return
isOk
;
}
}
public
class
TimeoutWebClient
:
WebClient
{
public
int
Timeout
{
get
;
set
;
}
public
TimeoutWebClient
()
{
Timeout
=
10000
;
}
public
TimeoutWebClient
(
int
timeout
)
{
Timeout
=
timeout
;
}
protected
override
WebRequest
GetWebRequest
(
Uri
address
)
{
WebRequest
request
=
base
.
GetWebRequest
(
address
);
request
.
Timeout
=
Timeout
;
return
request
;
}
}
\ No newline at end of file
Assets/SibylSystem/Room/RoomList.cs
View file @
065f88da
using
UnityEngine
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Threading
;
using
System.Linq
;
public
class
RoomList
:
WindowServantSP
...
...
@@ -11,13 +8,13 @@ public class RoomList : WindowServantSP
List
<
string
[
]>
listOfRooms
=
new
List
<
string
[
]>
();
bool
hideAI
;
bool
hideStarted
;
UILabel
room
Name
Label
;
UILabel
room
PSW
Label
;
public
override
void
initialize
()
{
createWindow
(
Program
.
I
().
new_ui_RoomList
);
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"refresh_"
,
onRefresh
);
room
Name
Label
=
UIHelper
.
getByName
<
UILabel
>(
gameObject
,
"roomNameLabel"
);
room
PSW
Label
=
UIHelper
.
getByName
<
UILabel
>(
gameObject
,
"roomNameLabel"
);
hideAI
=
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"hideAIrooms_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"hideAIrooms_"
,
"1"
));
hideStarted
=
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"hideStarted_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"hideStarted_"
,
"1"
));
UIHelper
.
registEvent
(
gameObject
,
"hideAIrooms_"
,
save
);
...
...
@@ -54,7 +51,7 @@ public class RoomList : WindowServantSP
}
public
override
void
hide
()
{
room
Name
Label
.
text
=
""
;
room
PSW
Label
.
text
=
""
;
base
.
hide
();
}
...
...
@@ -77,17 +74,6 @@ public class RoomList : WindowServantSP
{
superScrollView
.
add
(
room
[
9
]);
}
//for (int i = 0; i < listOfRooms.Count; i++)
//{
// //if (listOfRooms[i].Length > 4)
// //{
// // //if (/*listOfRooms[i].Substring(fileInfos[i].Name.Length - 4, 4) == ".lua"*/)
// // //{
// // // // superScrollView.add(listOfRooms[i].Substring(0, listOf.Name.Length - 4));
// // //}
// //}
//}
}
string
selectedString
=
string
.
Empty
;
...
...
@@ -106,12 +92,14 @@ public class RoomList : WindowServantSP
}
selectedString
=
superScrollView
.
selectedString
;
roomPsw
=
listOfRooms
.
Find
(
s
=>
s
[
9
]
==
selectedString
)[
2
];
int
roomNameIndex
=
roomPsw
.
LastIndexOf
(
"#"
)+
1
;
if
(
roomNameIndex
>
0
)
if
(
roomPsw
!=
null
)
{
room
NameLabel
.
text
=
roomPsw
.
Substring
(
roomNameIndex
)
;
room
PSWLabel
.
text
=
roomPsw
;
}
else
{
roomPSWLabel
.
text
=
""
;
}
}
void
JoinRoom
(
string
selectedString
,
string
roomPsw
)
...
...
Assets/SibylSystem/Setting/Setting.cs
View file @
065f88da
...
...
@@ -6,6 +6,8 @@ public class Setting : WindowServant2D
public
LAZYsetting
setting
;
public
bool
batterySaving
;
public
override
void
initialize
()
{
gameObject
=
createWindow
(
this
,
Program
.
I
().
new_ui_setting
);
...
...
@@ -14,6 +16,8 @@ public class Setting : WindowServant2D
UIHelper
.
registEvent
(
gameObject
,
"screen_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"full_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"resize_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"batterySaving"
,
batterySavingMode
);
batterySaving
=
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"batterySaving"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"batterySaving"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
=
Screen
.
fullScreen
;
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
=
Screen
.
width
.
ToString
()
+
"*"
+
Screen
.
height
.
ToString
();
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreWatcher_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"ignoreWatcher_"
,
"0"
));
...
...
@@ -77,6 +81,20 @@ public class Setting : WindowServant2D
onchangeCloud
();
}
private
void
batterySavingMode
()
{
if
(
batterySaving
)
{
Application
.
targetFrameRate
=
30
;
}
else
{
Application
.
targetFrameRate
=
-
1
;
}
batterySaving
=
!
batterySaving
;
save
();
}
private
void
readVales
()
{
try
...
...
@@ -237,6 +255,7 @@ public class Setting : WindowServant2D
public
void
save
()
{
Config
.
Set
(
"batterySaving"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"batterySaving"
).
value
));
Config
.
Set
(
"ignoreWatcher_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreWatcher_"
).
value
));
Config
.
Set
(
"ignoreOP_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreOP_"
).
value
));
Config
.
Set
(
"smartSelect_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"smartSelect_"
).
value
));
...
...
Assets/StreamingAssets/null.png
deleted
100644 → 0
View file @
ff10f957
676 Bytes
Assets/StreamingAssets/null.png.meta
deleted
100644 → 0
View file @
ff10f957
fileFormatVersion: 2
guid: 7cc6adf5988b03345bc3fbbdb145cbab
timeCreated: 1548561685
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/StreamingAssets/ygo
core
.zip
→
Assets/StreamingAssets/ygo
pro2
.zip
View file @
065f88da
File moved
Assets/StreamingAssets/ygo
core
.zip.meta
→
Assets/StreamingAssets/ygo
pro2
.zip.meta
View file @
065f88da
File moved
Assets/transUI/prefab/trans_selectDeck.prefab
View file @
065f88da
This diff is collapsed.
Click to expand it.
Assets/transUI/prefab/trans_setting.prefab
View file @
065f88da
This diff is collapsed.
Click to expand it.
ProjectSettings/ProjectVersion.txt
View file @
065f88da
m_EditorVersion: 5.6.
6f2
m_EditorVersion: 5.6.
7f1
README.md
View file @
065f88da
...
...
@@ -54,9 +54,9 @@ The feedbacks is checked every day.
> `cp -f -r libs ../../../Assets/Plugins/Android/`
# How to compile the libocgcore.so
、libsqlite3.so
? (Linux)
# How to compile the libocgcore.so? (Linux)
*In most case you do not need to care about the libocgcore.so
、libsqlite3.so
.*
*In most case you do not need to care about the libocgcore.so.*
> `cd AI_core_vs2017solution/build/gmake.linux`
...
...
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