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
9272e379
Commit
9272e379
authored
Apr 19, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Android' of github.com:Unicorn369/ygopro2_droid into Android
parents
45b18f28
cb329106
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
225 additions
and
95 deletions
+225
-95
Assets/ArtSystem/WaterBlur.shader
Assets/ArtSystem/WaterBlur.shader
+198
-73
Assets/ArtSystem/deckManager/new_search_remaster.prefab
Assets/ArtSystem/deckManager/new_search_remaster.prefab
+15
-15
Assets/SibylSystem/Menu/Menu.cs
Assets/SibylSystem/Menu/Menu.cs
+12
-7
No files found.
Assets/ArtSystem/WaterBlur.shader
View file @
9272e379
...
...
@@ -2,79 +2,204 @@
Shader
"Custom/WaterBlur"
{
Properties
{
_blurSizeXY
(
"BlurSizeXY"
,
Range
(
0
,
10
))
=
2
}
_blurSizeXY
(
"BlurSizeXY"
,
Range
(
0
,
20
))
=
1
_Color
(
"Main Color"
,
Color
)
=
(
1
,
1
,
1
,
1
)
_BumpAmt
(
"Distortion"
,
Range
(
0
,
128
))
=
10
_MainTex
(
"Tint Color (RGB)"
,
2
D
)
=
"white"
{}
_BumpMap
(
"Normalmap"
,
2
D
)
=
"bump"
{}
}
Category
{
// We must be transparent, so other objects are drawn before this one.
Tags
{
"Queue"
=
"Transparent"
"IgnoreProjector"
=
"True"
"RenderType"
=
"Opaque"
}
SubShader
{
// Draw ourselves after all opaque geometry
Tags
{
"Queue"
=
"Transparent"
}
// Grab the screen behind the object into _GrabTexture
GrabPass
{
}
// Render the object with the texture generated above
// Horizontal blur
GrabPass
{
Tags
{
"LightMode"
=
"Always"
}
}
Pass
{
Tags
{
"LightMode"
=
"Always"
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct
appdata_t
{
float4
vertex
:
POSITION
;
float2
texcoord
:
TEXCOORD0
;
};
struct
v2f
{
float4
vertex
:
POSITION
;
float4
uvgrab
:
TEXCOORD0
;
};
v2f
vert
(
appdata_t
v
)
{
v2f
o
;
o
.
vertex
=
UnityObjectToClipPos
(
v
.
vertex
);
#if UNITY_UV_STARTS_AT_TOP
float
scale
=
-
1
.
0
;
#else
float
scale
=
1
.
0
;
#endif
o
.
uvgrab
.
xy
=
(
float2
(
o
.
vertex
.
x
,
o
.
vertex
.
y
*
scale
)
+
o
.
vertex
.
w
)
*
0
.
5
;
o
.
uvgrab
.
zw
=
o
.
vertex
.
zw
;
return
o
;
}
CGPROGRAM
#pragma debug
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
sampler2D
_GrabTexture
:
register
(
s0
);
sampler2D
_GrabTexture
;
float4
_GrabTexture_TexelSize
;
float
_blurSizeXY
;
struct
data
{
half4
frag
(
v2f
i
)
:
COLOR
{
// half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
// return col;
half4
sum
=
half4
(
0
,
0
,
0
,
0
);
#define GRABPIXEL(weight,kernelx) tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(float4(i.uvgrab.x + _GrabTexture_TexelSize.x * kernelx * _blurSizeXY, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
sum
+=
GRABPIXEL
(
0
.
05
,
-
4
.
0
);
sum
+=
GRABPIXEL
(
0
.
09
,
-
3
.
0
);
sum
+=
GRABPIXEL
(
0
.
12
,
-
2
.
0
);
sum
+=
GRABPIXEL
(
0
.
15
,
-
1
.
0
);
sum
+=
GRABPIXEL
(
0
.
18
,
0
.
0
);
sum
+=
GRABPIXEL
(
0
.
15
,
+
1
.
0
);
sum
+=
GRABPIXEL
(
0
.
12
,
+
2
.
0
);
sum
+=
GRABPIXEL
(
0
.
09
,
+
3
.
0
);
sum
+=
GRABPIXEL
(
0
.
05
,
+
4
.
0
);
return
sum
;
}
ENDCG
}
// Vertical blur
GrabPass
{
Tags
{
"LightMode"
=
"Always"
}
}
Pass
{
Tags
{
"LightMode"
=
"Always"
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct
appdata_t
{
float4
vertex
:
POSITION
;
float3
normal
:
NORMAL
;
};
float2
texcoord
:
TEXCOORD0
;
};
struct
v2f
{
float4
position
:
POSITION
;
float4
screenPos
:
TEXCOORD0
;
};
struct
v2f
{
float4
vertex
:
POSITION
;
float4
uvgrab
:
TEXCOORD0
;
};
v2f
vert
(
data
i
)
{
v2f
vert
(
appdata_t
v
)
{
v2f
o
;
o
.
position
=
UnityObjectToClipPos
(
i
.
vertex
);
o
.
screenPos
=
o
.
position
;
o
.
vertex
=
UnityObjectToClipPos
(
v
.
vertex
);
#if UNITY_UV_STARTS_AT_TOP
float
scale
=
-
1
.
0
;
#else
float
scale
=
1
.
0
;
#endif
o
.
uvgrab
.
xy
=
(
float2
(
o
.
vertex
.
x
,
o
.
vertex
.
y
*
scale
)
+
o
.
vertex
.
w
)
*
0
.
5
;
o
.
uvgrab
.
zw
=
o
.
vertex
.
zw
;
return
o
;
}
}
half4
frag
(
v2f
i
)
:
COLOR
{
float2
screenPos
=
i
.
screenPos
.
xy
/
i
.
screenPos
.
w
;
float
depth
=
_blurSizeXY
*
0
.
0005
;
screenPos
.
x
=
(
screenPos
.
x
+
1
)
*
0
.
5
;
screenPos
.
y
=
1
-
(
screenPos
.
y
+
1
)
*
0
.
5
;
half4
sum
=
half4
(
0
.
0
h
,
0
.
0
h
,
0
.
0
h
,
0
.
0
h
);
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
-
5
.
0
*
depth
,
screenPos
.
y
+
5
.
0
*
depth
))
*
0
.
025
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
+
5
.
0
*
depth
,
screenPos
.
y
-
5
.
0
*
depth
))
*
0
.
025
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
-
4
.
0
*
depth
,
screenPos
.
y
+
4
.
0
*
depth
))
*
0
.
05
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
+
4
.
0
*
depth
,
screenPos
.
y
-
4
.
0
*
depth
))
*
0
.
05
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
-
3
.
0
*
depth
,
screenPos
.
y
+
3
.
0
*
depth
))
*
0
.
09
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
+
3
.
0
*
depth
,
screenPos
.
y
-
3
.
0
*
depth
))
*
0
.
09
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
-
2
.
0
*
depth
,
screenPos
.
y
+
2
.
0
*
depth
))
*
0
.
12
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
+
2
.
0
*
depth
,
screenPos
.
y
-
2
.
0
*
depth
))
*
0
.
12
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
-
1
.
0
*
depth
,
screenPos
.
y
+
1
.
0
*
depth
))
*
0
.
15
;
sum
+=
tex2D
(
_GrabTexture
,
float2
(
screenPos
.
x
+
1
.
0
*
depth
,
screenPos
.
y
-
1
.
0
*
depth
))
*
0
.
15
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
-
5
.
0
*
depth
)
*
0
.
025
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
-
4
.
0
*
depth
)
*
0
.
05
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
-
3
.
0
*
depth
)
*
0
.
09
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
-
2
.
0
*
depth
)
*
0
.
12
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
-
1
.
0
*
depth
)
*
0
.
15
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
)
*
0
.
16
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
+
5
.
0
*
depth
)
*
0
.
15
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
+
4
.
0
*
depth
)
*
0
.
12
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
+
3
.
0
*
depth
)
*
0
.
09
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
+
2
.
0
*
depth
)
*
0
.
05
;
sum
+=
tex2D
(
_GrabTexture
,
screenPos
+
1
.
0
*
depth
)
*
0
.
025
;
return
sum
/
2
;
}
ENDCG
sampler2D
_GrabTexture
;
float4
_GrabTexture_TexelSize
;
float
_blurSizeXY
;
half4
frag
(
v2f
i
)
:
COLOR
{
// half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
// return col;
half4
sum
=
half4
(
0
,
0
,
0
,
0
);
#define GRABPIXEL(weight,kernely) tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(float4(i.uvgrab.x, i.uvgrab.y + _GrabTexture_TexelSize.y * kernely * _blurSizeXY, i.uvgrab.z, i.uvgrab.w))) * weight
//G(X) = (1/(sqrt(2 * PI * deviation * deviation))) * exp(-(x*x / (2 * deviation * deviation)))
sum
+=
GRABPIXEL
(
0
.
05
,
-
4
.
0
);
sum
+=
GRABPIXEL
(
0
.
09
,
-
3
.
0
);
sum
+=
GRABPIXEL
(
0
.
12
,
-
2
.
0
);
sum
+=
GRABPIXEL
(
0
.
15
,
-
1
.
0
);
sum
+=
GRABPIXEL
(
0
.
18
,
0
.
0
);
sum
+=
GRABPIXEL
(
0
.
15
,
+
1
.
0
);
sum
+=
GRABPIXEL
(
0
.
12
,
+
2
.
0
);
sum
+=
GRABPIXEL
(
0
.
09
,
+
3
.
0
);
sum
+=
GRABPIXEL
(
0
.
05
,
+
4
.
0
);
return
sum
;
}
ENDCG
}
// Distortion
GrabPass
{
Tags
{
"LightMode"
=
"Always"
}
}
Pass
{
Tags
{
"LightMode"
=
"Always"
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct
appdata_t
{
float4
vertex
:
POSITION
;
float2
texcoord
:
TEXCOORD0
;
};
struct
v2f
{
float4
vertex
:
POSITION
;
float4
uvgrab
:
TEXCOORD0
;
float2
uvbump
:
TEXCOORD1
;
float2
uvmain
:
TEXCOORD2
;
};
float
_BumpAmt
;
float4
_BumpMap_ST
;
float4
_MainTex_ST
;
v2f
vert
(
appdata_t
v
)
{
v2f
o
;
o
.
vertex
=
UnityObjectToClipPos
(
v
.
vertex
);
#if UNITY_UV_STARTS_AT_TOP
float
scale
=
-
1
.
0
;
#else
float
scale
=
1
.
0
;
#endif
o
.
uvgrab
.
xy
=
(
float2
(
o
.
vertex
.
x
,
o
.
vertex
.
y
*
scale
)
+
o
.
vertex
.
w
)
*
0
.
5
;
o
.
uvgrab
.
zw
=
o
.
vertex
.
zw
;
o
.
uvbump
=
TRANSFORM_TEX
(
v
.
texcoord
,
_BumpMap
);
o
.
uvmain
=
TRANSFORM_TEX
(
v
.
texcoord
,
_MainTex
);
return
o
;
}
fixed4
_Color
;
sampler2D
_GrabTexture
;
float4
_GrabTexture_TexelSize
;
sampler2D
_BumpMap
;
sampler2D
_MainTex
;
half4
frag
(
v2f
i
)
:
COLOR
{
// calculate perturbed coordinates
half2
bump
=
UnpackNormal
(
tex2D
(
_BumpMap
,
i
.
uvbump
)).
rg
;
// we could optimize this by just reading the x y without reconstructing the Z
float2
offset
=
bump
*
_BumpAmt
*
_GrabTexture_TexelSize
.
xy
;
i
.
uvgrab
.
xy
=
offset
*
i
.
uvgrab
.
z
+
i
.
uvgrab
.
xy
;
half4
col
=
tex2Dproj
(
_GrabTexture
,
UNITY_PROJ_COORD
(
i
.
uvgrab
));
half4
tint
=
tex2D
(
_MainTex
,
i
.
uvmain
)
*
_Color
;
return
col
*
tint
;
}
ENDCG
}
}
}
Fallback
Off
}
\ No newline at end of file
Assets/ArtSystem/deckManager/new_search_remaster.prefab
View file @
9272e379
...
...
@@ -345,7 +345,7 @@ Transform:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
129162
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-64
,
y
:
98
,
z
:
0
}
m_LocalPosition
:
{
x
:
48
,
y
:
98
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
459346
}
...
...
@@ -433,7 +433,7 @@ Transform:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
169090
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
47
,
y
:
98
,
z
:
0
}
m_LocalPosition
:
{
x
:
-64
,
y
:
98
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
411446
}
...
...
@@ -525,7 +525,7 @@ BoxCollider:
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
9
4
,
y
:
36
,
z
:
0
}
m_Size
:
{
x
:
9
5
,
y
:
37
,
z
:
0
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!111
&11108840
Animation
:
...
...
@@ -717,7 +717,7 @@ MonoBehaviour:
anchorOffset
:
0
softBorderPadding
:
1
renderQueue
:
0
startingRenderQueue
:
300
5
startingRenderQueue
:
300
4
mClipTexture
:
{
fileID
:
0
}
mAlpha
:
1
mClipping
:
4
...
...
@@ -781,11 +781,11 @@ MonoBehaviour:
leftAnchor
:
target
:
{
fileID
:
418574
}
relative
:
1
absolute
:
-
113
absolute
:
-
224
rightAnchor
:
target
:
{
fileID
:
418574
}
relative
:
1
absolute
:
-19
absolute
:
-1
2
9
bottomAnchor
:
target
:
{
fileID
:
418574
}
relative
:
0
...
...
@@ -793,17 +793,17 @@ MonoBehaviour:
topAnchor
:
target
:
{
fileID
:
418574
}
relative
:
1
absolute
:
-3
1
absolute
:
-3
0
updateAnchors
:
1
mColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
mPivot
:
4
mWidth
:
9
4
mHeight
:
3
6
mWidth
:
9
5
mHeight
:
3
7
mDepth
:
0
autoResizeBoxCollider
:
1
hideIfOffScreen
:
0
keepAspectRatio
:
0
aspectRatio
:
2.
6111112
aspectRatio
:
2.
5675676
---
!u!114
&11438792
MonoBehaviour
:
m_ObjectHideFlags
:
1
...
...
@@ -1151,11 +1151,11 @@ MonoBehaviour:
leftAnchor
:
target
:
{
fileID
:
418574
}
relative
:
1
absolute
:
-
224
absolute
:
-
113
rightAnchor
:
target
:
{
fileID
:
418574
}
relative
:
1
absolute
:
-1
29
absolute
:
-1
8
bottomAnchor
:
target
:
{
fileID
:
418574
}
relative
:
0
...
...
@@ -1347,8 +1347,8 @@ MonoBehaviour:
updateAnchors
:
1
mColor
:
{
r
:
0.98823535
,
g
:
0.98823535
,
b
:
0.98823535
,
a
:
0.78431374
}
mPivot
:
4
mWidth
:
4
5
mHeight
:
4
5
mWidth
:
4
0
mHeight
:
4
0
mDepth
:
0
autoResizeBoxCollider
:
0
hideIfOffScreen
:
0
...
...
@@ -1412,7 +1412,7 @@ MonoBehaviour:
anchorOffset
:
0
softBorderPadding
:
1
renderQueue
:
0
startingRenderQueue
:
300
5
startingRenderQueue
:
300
4
mClipTexture
:
{
fileID
:
0
}
mAlpha
:
1
mClipping
:
3
...
...
Assets/SibylSystem/Menu/Menu.cs
View file @
9272e379
...
...
@@ -95,7 +95,11 @@ public class Menu : WindowServantSP
Program
.
I
().
quit
();
Program
.
Running
=
false
;
TcpHelper
.
SaveRecord
();
#if !UNITY_EDITOR || UNITY_ANDROID // IL2CPP 使用此方法才能退出
Application
.
Quit
();
#elif
Process
.
GetCurrentProcess
().
Kill
();
#endif
}
void
onClickOnline
()
...
...
@@ -144,16 +148,17 @@ public class Menu : WindowServantSP
Application
.
OpenURL
(
"https://github.com/Unicorn369/pro2_android_closeup/releases/tag/1.0"
);
#elif UNITY_ANDROID //Android
AndroidJavaObject
jo
=
new
AndroidJavaObject
(
"cn.unicorn369.library.API"
);
if
(!
File
.
Exists
(
"updates/closeup_version1.
2
.txt"
))
{
//用于检查更新
if
(
File
.
Exists
(
"closeup_version1.
2
.zip"
))
{
//如果有则直接解压
jo
.
Call
(
"doExtractZipFile"
,
"closeup_version1.
2
.zip"
,
Program
.
ANDROID_GAME_PATH
);
}
else
if
(
File
.
Exists
(
"updates/closeup_version1.
1
.txt"
)){
//如果有则下载更新包
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.
2
.zip"
);
if
(!
File
.
Exists
(
"updates/closeup_version1.
3
.txt"
))
{
//用于检查更新
if
(
File
.
Exists
(
"closeup_version1.
3
.zip"
))
{
//如果有则直接解压
jo
.
Call
(
"doExtractZipFile"
,
"closeup_version1.
3
.zip"
,
Program
.
ANDROID_GAME_PATH
);
}
else
if
(
File
.
Exists
(
"updates/closeup_version1.
2
.txt"
)){
//如果有则下载更新包
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.
3
.zip"
);
}
else
{
//否则下载并解压,锁定目录:ANDROID_GAME_PATH
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.
2
.zip"
);
jo
.
Call
(
"doDownloadZipFile"
,
"https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.
3
.zip"
);
}
}
else
{
jo
.
Call
(
"showToast"
,
"已下载,无需再次下载!"
);
jo
.
Call
(
"showToast"
,
"已是最新,无需再次下载!"
);
Program
.
PrintToChat
(
InterString
.
Get
(
"已是最新,无需再次下载!"
));
}
#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