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
e5be96be
Commit
e5be96be
authored
Apr 09, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Android' of
https://github.com/Unicorn369/YGOPro2_Droid
into Android
parents
654e5b06
d8d6f2c2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
95 additions
and
37 deletions
+95
-37
Assets/ArtSystem/gameInfo/gameInfo.cs
Assets/ArtSystem/gameInfo/gameInfo.cs
+14
-2
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
+1
-1
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+47
-17
Assets/SibylSystem/Servant.cs
Assets/SibylSystem/Servant.cs
+17
-5
Assets/old/Ocgcore/card/Materials/back_pic.mat
Assets/old/Ocgcore/card/Materials/back_pic.mat
+6
-4
Assets/old/Ocgcore/card/Materials/face_pic.mat
Assets/old/Ocgcore/card/Materials/face_pic.mat
+6
-4
Assets/old/Ocgcore/card/Materials/shower_mat.mat
Assets/old/Ocgcore/card/Materials/shower_mat.mat
+3
-3
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+1
-1
No files found.
Assets/ArtSystem/gameInfo/gameInfo.cs
View file @
e5be96be
...
...
@@ -330,9 +330,17 @@ public class gameInfo : MonoBehaviour
opponent
.
under
.
mainTexture
=
GameTextureManager
.
exBar
;
me
.
under
.
mainTexture
=
GameTextureManager
.
bar
;
}
if
(
Program
.
I
().
ocgcore
.
timeLimit
==
0
)
{
me
.
api_timeHint
.
text
=
"infinite"
;
opponent
.
api_timeHint
.
text
=
"infinite"
;
}
else
{
me
.
api_timeHint
.
text
=
"paused"
;
opponent
.
api_timeHint
.
text
=
"paused"
;
}
}
public
bool
amIdanger
()
{
...
...
@@ -341,6 +349,10 @@ public class gameInfo : MonoBehaviour
void
setTimeAbsolutely
(
int
player
,
int
t
)
{
if
(
Program
.
I
().
ocgcore
.
timeLimit
==
0
)
{
return
;
}
if
(
player
==
0
)
{
me
.
api_timeHint
.
text
=
t
.
ToString
()
+
"/"
+
Program
.
I
().
ocgcore
.
timeLimit
.
ToString
();
...
...
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
View file @
e5be96be
...
...
@@ -15,7 +15,7 @@ public static class TcpHelper
static
NetworkStream
networkStream
=
null
;
static
bool
canjoin
=
true
;
static
bool
roomListChecking
=
false
;
static
bool
roomListChecking
=
false
;
public
static
void
join
(
string
ipString
,
string
name
,
string
portString
,
string
pswString
,
string
version
)
{
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
e5be96be
...
...
@@ -372,13 +372,13 @@ public class Ocgcore : ServantWithCardDescription
if
(
c
!=
null
)
{
int
pposition
=
c
.
overFatherCount
-
1
-
p
.
position
;
return_value
.
y
-=
(
pposition
+
2
)
*
1
f
;
return_value
.
x
+=
(
pposition
+
1
)
*
0.
6
f
;
return_value
.
y
-=
(
pposition
+
2
)
*
0.25
f
;
return_value
.
x
+=
(
pposition
+
1
)
*
0.
15
f
;
}
else
{
return_value
.
y
-=
(
p
.
position
+
2
)
*
1
f
;
return_value
.
x
+=
(
p
.
position
+
1
)
*
0.
6
f
;
return_value
.
y
-=
(
p
.
position
+
2
)
*
0.25
f
;
return_value
.
x
+=
(
p
.
position
+
1
)
*
0.
15
f
;
}
}
...
...
@@ -1333,6 +1333,7 @@ public class Ocgcore : ServantWithCardDescription
isFirst
=
((
playertype
&
0xf
)
>
0
)
?
false
:
true
;
gameInfo
.
swaped
=
false
;
isObserver
=
((
playertype
&
0xf0
)
>
0
)
?
true
:
false
;
if
(
r
.
BaseStream
.
Length
>
17
)
// dumb fix for yrp3d replay older than v1.034.9
r
.
ReadByte
();
// duel_rule
life_0
=
r
.
ReadInt32
();
life_1
=
r
.
ReadInt32
();
...
...
@@ -1809,17 +1810,21 @@ public class Ocgcore : ServantWithCardDescription
break
;
case
GameMessage
.
HandResult
:
data
=
r
.
ReadByte
();
int
data1
=
data
&
0x3
;
int
data2
=
(
data
>>
2
)
&
0x3
;
string
scissors
=
InterString
.
Get
(
"剪刀"
);
string
rock
=
InterString
.
Get
(
"石头"
);
string
paper
=
InterString
.
Get
(
"布"
);
string
res1
=
(
data1
==
1
?
scissors
:
(
data1
==
2
?
paper
:
rock
));
string
res2
=
(
data2
==
1
?
scissors
:
(
data2
==
2
?
paper
:
rock
));
int
res1
=
(
data
&
0x3
)
-
1
;
int
res2
=
((
data
>>
2
)
&
0x3
)
-
1
;
if
(
isFirst
)
printDuelLog
(
InterString
.
Get
(
"猜拳结果:你好像出了"
)
+
res2
+
InterString
.
Get
(
",对方好像出了"
)
+
res1
);
{
Program
.
I
().
new_ui_handShower
.
GetComponent
<
handShower
>().
me
=
res1
;
Program
.
I
().
new_ui_handShower
.
GetComponent
<
handShower
>().
op
=
res2
;
}
else
printDuelLog
(
InterString
.
Get
(
"猜拳结果:你好像出了"
)
+
res1
+
InterString
.
Get
(
",对方好像出了"
)
+
res2
);
{
Program
.
I
().
new_ui_handShower
.
GetComponent
<
handShower
>().
me
=
res2
;
Program
.
I
().
new_ui_handShower
.
GetComponent
<
handShower
>().
op
=
res1
;
}
GameObject
handres
=
create
(
Program
.
I
().
new_ui_handShower
,
Vector3
.
zero
,
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
);
destroy
(
handres
,
10f
);
Sleep
(
60
);
break
;
case
GameMessage
.
Attack
:
game_card
=
GCS_cardGet
(
r
.
ReadGPS
(),
false
);
...
...
@@ -4184,9 +4189,20 @@ public class Ocgcore : ServantWithCardDescription
}
break
;
case
GameMessage
.
RockPaperScissors
:
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
UnityEngine
.
Random
.
Range
(
0
,
2
));
sendReturn
(
binaryMaster
.
get
());
if
(
inIgnoranceReplay
()
||
inTheWorld
())
{
break
;
}
if
(
condition
==
Condition
.
record
)
{
Sleep
(
60
);
}
destroy
(
waitObject
,
0
,
false
,
true
);
player
=
localPlayer
(
r
.
ReadByte
());
RMSshow_tp
(
"RockPaperScissors"
,
new
messageSystemValue
{
hint
=
"jiandao"
,
value
=
"1"
}
,
new
messageSystemValue
{
hint
=
"shitou"
,
value
=
"2"
}
,
new
messageSystemValue
{
hint
=
"bu"
,
value
=
"3"
});
break
;
case
GameMessage
.
ConfirmDecktop
:
player
=
localPlayer
(
r
.
ReadByte
());
...
...
@@ -8819,6 +8835,20 @@ public class Ocgcore : ServantWithCardDescription
}
}
break
;
case
"RockPaperScissors"
:
{
try
{
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
Int32
.
Parse
(
result
[
0
].
value
));
sendReturn
(
binaryMaster
.
get
());
}
catch
(
Exception
e
)
{
Debug
.
Log
(
e
);
}
}
break
;
}
}
...
...
Assets/SibylSystem/Servant.cs
View file @
e5be96be
using
UnityEngine
;
using
System
;
using
System.Collections.Generic
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
Servant
{
public
GameObject
gameObject
;
...
...
@@ -693,14 +695,24 @@ public class Servant
UIHelper
.
registEvent
(
currentMSwindow
,
"atk_"
,
ES_RMSpremono
,
atk
);
UIHelper
.
registEvent
(
currentMSwindow
,
"def_"
,
ES_RMSpremono
,
def
);
UITexture
atkpic
=
UIHelper
.
getByName
<
UITexture
>(
currentMSwindow
,
"atkPic_"
);
UIButton
defbutton
=
UIHelper
.
getByName
<
UIButton
>(
currentMSwindow
,
"def_"
);
if
(
Int32
.
Parse
(
atk
.
value
)
==
(
int
)
CardPosition
.
FaceUpDefence
)
{
atkpic
.
transform
.
localRotation
=
Quaternion
.
Euler
(
0f
,
0f
,
90f
);
defbutton
.
transform
.
localPosition
=
new
Vector3
(
72.8f
,
2f
,
0f
);
}
else
{
atkpic
.
transform
.
localRotation
=
Quaternion
.
Euler
(
0f
,
0f
,
0f
);
defbutton
.
transform
.
localPosition
=
new
Vector3
(
62.8f
,
0f
,
0f
);
}
cardPicLoader
cardPicLoader_
=
currentMSwindow
.
AddComponent
<
cardPicLoader
>();
cardPicLoader_
.
code
=
code
;
cardPicLoader_
.
uiTexture
=
UIHelper
.
getByName
<
UITexture
>(
currentMSwindow
,
"atkPic_"
)
;
cardPicLoader_
.
uiTexture
=
atkpic
;
cardPicLoader_
=
currentMSwindow
.
AddComponent
<
cardPicLoader
>();
if
(
Int32
.
Parse
(
def
.
value
)
!=
8
)
cardPicLoader_
.
code
=
code
;
else
cardPicLoader_
.
code
=
0
;
cardPicLoader_
.
code
=
(
Int32
.
Parse
(
def
.
value
)
==
(
int
)
CardPosition
.
FaceDownDefence
)
?
0
:
code
;
cardPicLoader_
.
uiTexture
=
UIHelper
.
getByName
<
UITexture
>(
currentMSwindow
,
"defPic_"
);
}
...
...
Assets/old/Ocgcore/card/Materials/back_pic.mat
View file @
e5be96be
...
...
@@ -7,14 +7,13 @@ Material:
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_Name
:
back_pic
m_Shader
:
{
fileID
:
46
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_Shader
:
{
fileID
:
10752
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_ShaderKeywords
:
_ALPHATEST_ON _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags
:
5
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
2000
stringTagMap
:
RenderType
:
TransparentCutout
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
...
...
@@ -69,7 +68,9 @@ Material:
-
_DstBlend
:
0
-
_Emission
:
0.5
-
_FPOW
:
5
-
_GlossMapScale
:
1
-
_Glossiness
:
0.5
-
_GlossyReflections
:
1
-
_InvFade
:
1
-
_Metallic
:
0
-
_Mode
:
1
...
...
@@ -79,6 +80,7 @@ Material:
-
_R0
:
0.05
-
_RimIntensity
:
3
-
_RimPower
:
3
-
_SmoothnessTextureChannel
:
0
-
_SpecularHighlights
:
0
-
_SrcBlend
:
1
-
_UVSec
:
0
...
...
Assets/old/Ocgcore/card/Materials/face_pic.mat
View file @
e5be96be
...
...
@@ -7,14 +7,13 @@ Material:
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_Name
:
face_pic
m_Shader
:
{
fileID
:
46
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_Shader
:
{
fileID
:
10752
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_ShaderKeywords
:
_ALPHATEST_ON _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags
:
5
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
2450
stringTagMap
:
RenderType
:
TransparentCutout
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
...
...
@@ -95,7 +94,9 @@ Material:
-
_DstBlend
:
0
-
_Exposure
:
1
-
_Focus
:
-100
-
_GlossMapScale
:
1
-
_Glossiness
:
0.5
-
_GlossyReflections
:
1
-
_InvFade
:
1
-
_Metallic
:
0
-
_Mode
:
1
...
...
@@ -103,6 +104,7 @@ Material:
-
_Parallax
:
0.02
-
_Rotation
:
0
-
_Shininess
:
0.2
-
_SmoothnessTextureChannel
:
0
-
_SpecularHighlights
:
0
-
_SrcBlend
:
1
-
_UVSec
:
0
...
...
Assets/old/Ocgcore/card/Materials/shower_mat.mat
View file @
e5be96be
...
...
@@ -7,12 +7,12 @@ Material:
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_Name
:
shower_mat
m_Shader
:
{
fileID
:
3
0
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_Shader
:
{
fileID
:
1075
0
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_ShaderKeywords
:
m_LightmapFlags
:
5
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
3000
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
...
...
@@ -39,7 +39,7 @@ Material:
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_MainTex
:
m_Texture
:
{
fileID
:
28
91320
,
guid
:
cbd439a6b1dc1ab4284c3161ae0e8dac
,
type
:
2
}
m_Texture
:
{
fileID
:
28
00000
,
guid
:
6a6ef1fd91ae4f04085befdd9869fe20
,
type
:
3
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_MetallicGlossMap
:
...
...
ProjectSettings/ProjectSettings.asset
View file @
e5be96be
...
...
@@ -148,7 +148,7 @@ PlayerSettings:
tvOS
:
cn.ygopro2.ygopro2android
buildNumber
:
iOS
:
AndroidBundleVersionCode
:
7
AndroidBundleVersionCode
:
8
AndroidMinSdkVersion
:
16
AndroidTargetSdkVersion
:
0
AndroidPreferredInstallLocation
:
0
...
...
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