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
1
Issues
1
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
hex
ygopro2
Commits
645bee95
Commit
645bee95
authored
Jul 02, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to 0x1362
parent
3606ed65
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
883 additions
and
418 deletions
+883
-418
Assets/SibylSystem/Config.cs
Assets/SibylSystem/Config.cs
+13
-11
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
+10
-0
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
+780
-389
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+74
-13
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+2
-2
Assets/StreamingAssets/ygopro2-data.zip
Assets/StreamingAssets/ygopro2-data.zip
+0
-0
Assets/YGOSharp/Enums/CtosMessage.cs
Assets/YGOSharp/Enums/CtosMessage.cs
+2
-1
Assets/transUI/prefab/trans_menu.prefab
Assets/transUI/prefab/trans_menu.prefab
+1
-1
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+1
-1
ygopro2-data/updates/version-1.036.2-TCube.txt
ygopro2-data/updates/version-1.036.2-TCube.txt
+0
-0
No files found.
Assets/SibylSystem/Config.cs
View file @
645bee95
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
public
static
class
Config
{
public
static
uint
ClientVersion
=
0x136
1
;
public
static
uint
ClientVersion
=
0x136
2
;
class
oneString
{
...
...
@@ -51,7 +52,10 @@ public static class Config
if
(
loaded
==
false
)
{
loaded
=
true
;
string
[]
lines
=
File
.
ReadAllText
(
"textures/ui/config.txt"
).
Replace
(
"\r"
,
""
).
Replace
(
" "
,
""
).
Split
(
"\n"
);
//YGOMobile Paths
string
[]
lines
=
File
.
ReadAllText
(
"textures/ui/config.txt"
)
.
Replace
(
"\r"
,
""
)
.
Replace
(
" "
,
""
)
.
Split
(
"\n"
);
//YGOMobile Paths
for
(
int
i
=
0
;
i
<
lines
.
Length
;
i
++)
{
string
[]
mats
=
lines
[
i
].
Split
(
"="
);
...
...
@@ -83,18 +87,16 @@ public static class Config
{
getted
=
Int32
.
Parse
(
Get
(
v
,
"0"
));
}
catch
(
Exception
)
{
}
catch
(
Exception
)
{
}
return
((
float
)
getted
)
/
100000f
;
}
internal
static
void
setFloat
(
string
v
,
float
f
)
internal
static
void
setFloat
(
string
v
,
float
f
)
{
Set
(
v
,
((
int
)(
f
*
100000f
)).
ToString
());
Set
(
v
,
((
int
)(
f
*
100000f
)).
ToString
());
}
public
static
string
Get
(
string
original
,
string
defau
)
public
static
string
Get
(
string
original
,
string
defau
)
{
string
return_value
=
defau
;
bool
finded
=
false
;
...
...
@@ -122,7 +124,7 @@ public static class Config
return
return_value
;
}
public
static
void
Set
(
string
original
,
string
setted
)
public
static
void
Set
(
string
original
,
string
setted
)
{
bool
finded
=
false
;
for
(
int
i
=
0
;
i
<
translations
.
Count
;
i
++)
...
...
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
View file @
645bee95
...
...
@@ -40,6 +40,7 @@ public static class TcpHelper
networkStream
=
tcpClient
.
GetStream
();
Thread
t
=
new
Thread
(
receiver
);
t
.
Start
();
CtosMessage_ExternalAddress
(
ipString
);
CtosMessage_PlayerInfo
(
name
);
if
(
pswString
==
"L"
)
{
...
...
@@ -363,6 +364,15 @@ public static class TcpHelper
Send
(
message
);
}
public
static
void
CtosMessage_ExternalAddress
(
string
hostname
)
{
var
message
=
new
Package
();
message
.
Fuction
=
(
int
)
CtosMessage
.
ExternalAddress
;
message
.
Data
.
writer
.
Write
((
UInt32
)
0
);
message
.
Data
.
writer
.
WriteUnicode
(
hostname
,
hostname
.
Length
+
1
);
Send
(
message
);
}
public
static
void
CtosMessage_PlayerInfo
(
string
name
)
{
Package
message
=
new
Package
();
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
View file @
645bee95
...
...
@@ -25,6 +25,7 @@ public class Effect
public
int
ptr
;
public
string
desc
;
public
int
flag
;
public
bool
forced
=
false
;
}
public
class
gameCard
:
OCGobject
...
...
@@ -121,7 +122,7 @@ public class gameCard : OCGobject
public
gameCard
()
{
gameObject
=
Program
.
I
().
create
(
Program
.
I
().
mod_ocgcore_card
);
gameObject
=
Program
.
I
().
create
(
Program
.
I
().
mod_ocgcore_card
);
gameObject_face
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"face"
).
gameObject
;
gameObject_back
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"back"
).
gameObject
;
gameObject_event_main
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"event"
).
gameObject
;
...
...
@@ -140,7 +141,6 @@ public class gameCard : OCGobject
selectKuang
.
SetActive
(
false
);
chainKuang
.
SetActive
(
false
);
gameObject
.
SetActive
(
false
);
}
public
bool
forceRefreshCondition
=
false
;
...
...
@@ -207,7 +207,7 @@ public class gameCard : OCGobject
controller
=
0
,
location
=
0
,
position
=
0
,
sequence
=
0
sequence
=
0
,
};
CS_clear
();
}
...
...
@@ -236,12 +236,17 @@ public class gameCard : OCGobject
public
enum
flashType
{
SpSummon
,
Active
,
Select
,
none
SpSummon
,
Active
,
Select
,
none
,
}
public
enum
kuangType
{
selected
,
chaining
,
none
selected
,
chaining
,
none
,
}
public
flashType
currentFlash
=
flashType
.
none
;
...
...
@@ -252,9 +257,12 @@ public class gameCard : OCGobject
kuangType
currentKuangPre
=
kuangType
.
none
;
FlashingController
[]
SpSummonFlash
,
ActiveFlash
,
SelectFlash
;
FlashingController
[]
SpSummonFlash
,
ActiveFlash
,
SelectFlash
;
GameObject
selectKuang
,
chainKuang
;
GameObject
selectKuang
,
chainKuang
;
FlashingController
MouseFlash
;
...
...
@@ -272,30 +280,53 @@ public class gameCard : OCGobject
Vector3
screenposition
=
Vector3
.
zero
;
if
(
cardDecorations
[
i
].
up_of_card
)
{
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1.2f
,
1.2f
*
1.732f
));
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1.2f
,
1.2f
*
1.732f
)
);
}
else
{
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject_face
.
transform
.
position
);
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject_face
.
transform
.
position
);
}
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
cardDecorations
[
i
].
relative_position
));
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
cardDecorations
[
i
].
relative_position
)
);
cardDecorations
[
i
].
game_object
.
transform
.
eulerAngles
=
cardDecorations
[
i
].
rotation
;
cardDecorations
[
i
].
game_object
.
transform
.
position
=
worldposition
;
if
(
cardDecorations
[
i
].
scale_change_ignored
==
false
)
cardDecorations
[
i
].
game_object
.
transform
.
localScale
+=
(
new
Vector3
(
1
,
1
,
1
)
-
cardDecorations
[
i
].
game_object
.
transform
.
localScale
)
*
0.3f
;
cardDecorations
[
i
].
game_object
.
transform
.
localScale
+=
(
new
Vector3
(
1
,
1
,
1
)
-
cardDecorations
[
i
].
game_object
.
transform
.
localScale
)
*
0.3f
;
}
}
for
(
int
i
=
0
;
i
<
overlay_lights
.
Count
;
i
++)
{
overlay_lights
[
i
].
transform
.
position
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1.8f
,
0
);
overlay_lights
[
i
].
transform
.
position
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1.8f
,
0
);
}
if
(
obj_number
!=
null
)
{
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1f
*
2.4f
,
1.732f
*
2.4f
));
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
5
));
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1f
*
2.4f
,
1.732f
*
2.4f
)
);
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
5
)
);
obj_number
.
transform
.
position
=
worldposition
;
}
if
(
disabled
==
true
&&
(((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
||
((
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)))
if
(
disabled
==
true
&&
(
((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
||
((
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
)
)
{
if
(
nagaSign
==
null
)
{
...
...
@@ -305,22 +336,22 @@ public class gameCard : OCGobject
}
if
(
game_object_verticle_drawing
!=
null
&&
Program
.
getVerticalTransparency
()
>
0.5f
)
{
if
(
nagaSign
.
transform
.
parent
!=
game_object_verticle_drawing
.
transform
)
if
(
nagaSign
.
transform
.
parent
!=
game_object_verticle_drawing
.
transform
)
{
nagaSign
.
transform
.
SetParent
(
game_object_verticle_drawing
.
transform
);
nagaSign
.
transform
.
localRotation
=
Quaternion
.
identity
;
nagaSign
.
transform
.
localScale
=
Vector3
.
zero
;
nagaSign
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
-
0.25f
);
nagaSign
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
-
0.25f
);
}
try
{
Vector3
devide
=
game_object_verticle_drawing
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
nagaSign
.
transform
.
localScale
=
(
new
Vector3
(
2.4f
/
devide
.
x
,
2.4f
/
devide
.
y
,
2.4f
/
devide
.
z
));
}
catch
(
Exception
)
{
nagaSign
.
transform
.
localScale
=
(
new
Vector3
(
2.4f
/
devide
.
x
,
2.4f
/
devide
.
y
,
2.4f
/
devide
.
z
)
);
}
catch
(
Exception
)
{
}
}
else
{
...
...
@@ -335,21 +366,21 @@ public class gameCard : OCGobject
{
Vector3
devide
=
gameObject_face
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
nagaSign
.
transform
.
localScale
=
(
new
Vector3
(
2.4f
/
devide
.
x
,
2.4f
/
devide
.
y
,
2.4f
/
devide
.
z
));
}
catch
(
Exception
)
{
nagaSign
.
transform
.
localScale
=
(
new
Vector3
(
2.4f
/
devide
.
x
,
2.4f
/
devide
.
y
,
2.4f
/
devide
.
z
)
);
}
catch
(
Exception
)
{
}
}
}
else
{
if
(
nagaSign
!=
null
)
{
destroy
(
nagaSign
,
0.6f
,
true
,
true
);
destroy
(
nagaSign
,
0.6f
,
true
,
true
);
}
}
if
(
currentKuangPre
!=
currentKuang
)
if
(
currentKuangPre
!=
currentKuang
)
{
currentKuangPre
=
currentKuang
;
switch
(
currentKuang
)
...
...
@@ -367,7 +398,6 @@ public class gameCard : OCGobject
chainKuang
.
SetActive
(
false
);
break
;
}
}
if
(
currentFlashPre
!=
currentFlash
)
{
...
...
@@ -560,8 +590,11 @@ public class gameCard : OCGobject
private
void
ES_excited_handler_close_up_handler
()
{
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
accurate_position
);
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
10
));
gameObject
.
transform
.
position
+=
(
worldposition
-
gameObject
.
transform
.
position
)
*
35f
*
Program
.
deltaTime
;
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
10
)
);
gameObject
.
transform
.
position
+=
(
worldposition
-
gameObject
.
transform
.
position
)
*
35f
*
Program
.
deltaTime
;
if
(
game_object_verticle_drawing
!=
null
)
{
card_verticle_drawing_handler
();
...
...
@@ -584,23 +617,34 @@ public class gameCard : OCGobject
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
{
buttons
[
i
].
show
(
vector_of_begin
-
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
-
(
new
Vector3
(
0
,
20f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
)));
buttons
[
i
]
.
show
(
vector_of_begin
-
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
-
(
new
Vector3
(
0
,
20f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
);
}
return
;
}
if
(
condition
==
gameCardCondition
.
floating_clickable
)
{
Vector3
vector_of_begin
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1
,
1.732f
);
Vector3
vector_of_begin
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
1
,
1.732f
);
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
{
buttons
[
i
].
show
(
vector_of_begin
+
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
+
(
new
Vector3
(
0
,
35f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
)));
buttons
[
i
]
.
show
(
vector_of_begin
+
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
+
(
new
Vector3
(
0
,
35f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
);
}
return
;
}
if
(
condition
==
gameCardCondition
.
verticle_clickable
)
if
(
condition
==
gameCardCondition
.
verticle_clickable
)
{
if
(
VerticleCollider
==
null
)
{
...
...
@@ -616,7 +660,12 @@ public class gameCard : OCGobject
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
{
buttons
[
i
].
show
(
vector_of_begin
+
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
+
(
new
Vector3
(
0
,
35f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
)));
buttons
[
i
]
.
show
(
vector_of_begin
+
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
+
(
new
Vector3
(
0
,
35f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
);
}
}
else
...
...
@@ -624,11 +673,17 @@ public class gameCard : OCGobject
float
h
=
loaded_verticalDrawingK
*
0.618f
;
Vector3
vector_of_begin
=
Vector3
.
zero
;
float
l
=
(
0.5f
*
game_object_verticle_drawing
.
transform
.
localScale
.
y
*
(
h
-
0.5f
));
vector_of_begin
=
game_object_verticle_drawing
.
transform
.
position
+
new
Vector3
(
0
,
l
,
l
*
1.732f
);
vector_of_begin
=
game_object_verticle_drawing
.
transform
.
position
+
new
Vector3
(
0
,
l
,
l
*
1.732f
);
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
{
buttons
[
i
].
show
(
vector_of_begin
+
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
+
(
new
Vector3
(
0
,
35f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
)));
buttons
[
i
]
.
show
(
vector_of_begin
+
i
*
(
new
Vector3
(
0
,
65f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
+
(
new
Vector3
(
0
,
35f
*
0.7f
*
(
float
)
Screen
.
height
/
700f
))
);
}
}
return
;
...
...
@@ -641,8 +696,10 @@ public class gameCard : OCGobject
{
if
(
gameObject_event_card_bed
==
null
)
{
gameObject_event_card_bed
=
create
(
Program
.
I
().
mod_ocgcore_hidden_button
,
gameObject
.
transform
.
position
);
gameObject_event_card_bed
=
create
(
Program
.
I
().
mod_ocgcore_hidden_button
,
gameObject
.
transform
.
position
);
}
}
else
...
...
@@ -660,7 +717,8 @@ public class gameCard : OCGobject
//Program.I().audio.Play();
//deltaTimeCloseUp = 0;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
if
(
condition
==
gameCardCondition
.
floating_clickable
)
{
flash_line_on
();
...
...
@@ -679,24 +737,44 @@ public class gameCard : OCGobject
float
pianyi
=
130f
;
if
(
Program
.
getVerticalTransparency
()
<
0.5f
)
{
pianyi
=
90f
;
pianyi
=
90f
;
}
Vector3
screen_vector_to_move
=
screen
+
new
Vector3
(
pianyi
*
k
+
60f
*
k
*
(
overlayed_cards
.
Count
-
overlayed_cards
[
x
].
p
.
position
-
1
),
0
,
12f
+
2f
*
(
overlayed_cards
.
Count
-
overlayed_cards
[
x
].
p
.
position
-
1
));
Vector3
screen_vector_to_move
=
screen
+
new
Vector3
(
pianyi
*
k
+
60f
*
k
*
(
overlayed_cards
.
Count
-
overlayed_cards
[
x
].
p
.
position
-
1
),
0
,
12f
+
2f
*
(
overlayed_cards
.
Count
-
overlayed_cards
[
x
].
p
.
position
-
1
)
);
overlayed_cards
[
x
].
flash_line_on
();
overlayed_cards
[
x
].
TweenTo
(
Camera
.
main
.
ScreenToWorldPoint
(
screen_vector_to_move
),
new
Vector3
(-
30
,
0
,
0
),
true
);
overlayed_cards
[
x
]
.
TweenTo
(
Camera
.
main
.
ScreenToWorldPoint
(
screen_vector_to_move
),
new
Vector3
(-
30
,
0
,
0
),
true
);
}
}
}
void
showMeLeft
(
bool
force
=
false
)
void
showMeLeft
(
bool
force
=
false
)
{
Program
.
I
().
cardDescription
.
setData
(
data
,
p
.
controller
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
,
tails
.
managedString
,
force
);
Program
.
I
()
.
cardDescription
.
setData
(
data
,
p
.
controller
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
,
tails
.
managedString
,
force
);
}
public
void
ES_exit_excited
(
bool
move_to_original_place
)
{
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
flash_line_off
();
ES_excited_unsafe_should_not_be_changed_dont_touch_this
=
false
;
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
...
...
@@ -719,7 +797,7 @@ public class gameCard : OCGobject
public
void
ES_safe_card_move_to_original_place
()
{
TweenTo
(
accurate_position
,
accurate_rotation
);
TweenTo
(
accurate_position
,
accurate_rotation
);
}
private
void
ES_safe_card_move
(
Hashtable
move_hash
,
Hashtable
rotate_hash
)
...
...
@@ -763,11 +841,14 @@ public class gameCard : OCGobject
public
void
UA_flush_all_gived_witn_lock
(
bool
rush
)
{
if
(
Vector3
.
Distance
(
gived_position
,
accurate_position
)
>
0.001f
||
Vector3
.
Distance
(
gived_rotation
,
accurate_rotation
)
>
0.001f
)
if
(
Vector3
.
Distance
(
gived_position
,
accurate_position
)
>
0.001f
||
Vector3
.
Distance
(
gived_rotation
,
accurate_rotation
)
>
0.001f
)
{
float
time
=
0.25f
;
time
+=
Vector3
.
Distance
(
gived_position
,
gameObject
.
transform
.
position
)
*
0.05f
/
20f
;
ES_lock
(
time
+
0.1f
);
ES_lock
(
time
+
0.1f
);
UA_reloadCardHintPosition
();
if
(
rush
)
{
...
...
@@ -780,12 +861,9 @@ public class gameCard : OCGobject
TweenTo
(
gived_position
,
gived_rotation
);
if
(
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Move
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Swap
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
PosChange
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
FlipSummoning
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Swap
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
PosChange
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
FlipSummoning
)
{
Program
.
I
().
ocgcore
.
Sleep
((
int
)(
30f
*
time
));
...
...
@@ -811,15 +889,26 @@ public class gameCard : OCGobject
//time *= 20;
iTween
.
EaseType
e
=
iTween
.
EaseType
.
easeOutQuad
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
pos
)
<
Vector3
.
Distance
(
Vector3
.
zero
,
gameObject
.
transform
.
position
))
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
pos
)
<
Vector3
.
Distance
(
Vector3
.
zero
,
gameObject
.
transform
.
position
)
)
{
e
=
iTween
.
EaseType
.
easeInQuad
;
}
if
(
((
Math
.
Abs
(
gived_rotation
.
x
)
<
10
&&
Vector3
.
Distance
(
pos
,
gameObject
.
transform
.
position
)
>
1f
))
||
(
accurate_position
.
x
==
pos
.
x
&&
accurate_position
.
y
<
pos
.
y
&&
accurate_position
.
z
==
pos
.
z
)
(
(
Math
.
Abs
(
gived_rotation
.
x
)
<
10
&&
Vector3
.
Distance
(
pos
,
gameObject
.
transform
.
position
)
>
1f
)
)
||
(
accurate_position
.
x
==
pos
.
x
&&
accurate_position
.
y
<
pos
.
y
&&
accurate_position
.
z
==
pos
.
z
)
)
{
Vector3
from
=
gameObject
.
transform
.
position
;
...
...
@@ -827,97 +916,64 @@ public class gameCard : OCGobject
Vector3
[]
path
=
new
Vector3
[
30
];
for
(
int
i
=
0
;
i
<
30
;
i
++)
{
path
[
i
]
=
from
+
(
to
-
from
)
*
(
float
)
i
/
29f
+
(
new
Vector3
(
0
,
1.5f
,
0
))
*
(
float
)
Math
.
Sin
(
3.1415926
*
(
double
)
i
/
29d
);
path
[
i
]
=
from
+
(
to
-
from
)
*
(
float
)
i
/
29f
+
(
new
Vector3
(
0
,
1.5f
,
0
))
*
(
float
)
Math
.
Sin
(
3.1415926
*
(
double
)
i
/
29d
);
}
if
(
exciting
)
{
ES_safe_card_move
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"path"
,
path
,
"time"
,
time
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"path"
,
path
,
"time"
,
time
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
);
}
else
{
ES_safe_card_move
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"path"
,
path
,
"time"
,
time
,
"easetype"
,
e
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"path"
,
path
,
"time"
,
time
,
"easetype"
,
e
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
,
"easetype"
,
e
)
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
,
"easetype"
,
e
)
);
}
}
else
{
if
(
exciting
)
{
ES_safe_card_move
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"time"
,
time
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"time"
,
time
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
);
}
else
{
ES_safe_card_move
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"time"
,
time
,
"easetype"
,
e
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
,
"easetype"
,
e
)
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"time"
,
time
,
"easetype"
,
e
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
,
"easetype"
,
e
)
);
}
}
}
private
void
UA_reloadCardHintPosition
()
{
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
if
(
(
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
if
(
p
.
controller
==
0
)
{
...
...
@@ -969,7 +1025,10 @@ public class gameCard : OCGobject
try
{
gameObject_event_main
.
GetComponent
<
MeshCollider
>().
enabled
=
true
;
gameObject
.
transform
.
Find
(
"card"
).
GetComponent
<
animation_floating_slow
>().
enabled
=
true
;
gameObject
.
transform
.
Find
(
"card"
)
.
GetComponent
<
animation_floating_slow
>()
.
enabled
=
true
;
}
catch
(
System
.
Exception
e
)
{
...
...
@@ -977,7 +1036,8 @@ public class gameCard : OCGobject
}
destroy
(
game_object_monster_cloude
);
destroy
(
game_object_verticle_drawing
);
if
(
verticle_number
!=
null
)
destroy
(
verticle_number
.
gameObject
);
if
(
verticle_number
!=
null
)
destroy
(
verticle_number
.
gameObject
);
destroy
(
game_object_verticle_Star
);
refreshFunctions
.
Remove
(
this
.
card_verticle_drawing_handler
);
refreshFunctions
.
Remove
(
this
.
monster_cloude_handler
);
...
...
@@ -991,7 +1051,10 @@ public class gameCard : OCGobject
try
{
gameObject_event_main
.
GetComponent
<
MeshCollider
>().
enabled
=
false
;
gameObject
.
transform
.
Find
(
"card"
).
GetComponent
<
animation_floating_slow
>().
enabled
=
false
;
gameObject
.
transform
.
Find
(
"card"
)
.
GetComponent
<
animation_floating_slow
>()
.
enabled
=
false
;
destroy
(
gameObject_event_card_bed
);
}
catch
(
System
.
Exception
e
)
...
...
@@ -1000,7 +1063,8 @@ public class gameCard : OCGobject
}
destroy
(
game_object_monster_cloude
);
destroy
(
game_object_verticle_drawing
);
if
(
verticle_number
!=
null
)
destroy
(
verticle_number
.
gameObject
);
if
(
verticle_number
!=
null
)
destroy
(
verticle_number
.
gameObject
);
destroy
(
game_object_verticle_Star
);
refreshFunctions
.
Remove
(
this
.
card_verticle_drawing_handler
);
refreshFunctions
.
Remove
(
this
.
monster_cloude_handler
);
...
...
@@ -1014,7 +1078,10 @@ public class gameCard : OCGobject
try
{
gameObject_event_main
.
GetComponent
<
MeshCollider
>().
enabled
=
true
;
gameObject
.
transform
.
Find
(
"card"
).
GetComponent
<
animation_floating_slow
>().
enabled
=
true
;
gameObject
.
transform
.
Find
(
"card"
)
.
GetComponent
<
animation_floating_slow
>()
.
enabled
=
true
;
}
catch
(
System
.
Exception
e
)
{
...
...
@@ -1034,11 +1101,13 @@ public class gameCard : OCGobject
}
}
}
int
loaded_controller
=
-
1
;
int
loaded_location
=
-
1
;
private
void
card_floating_text_handler
()
{
if
(
loaded_controller
!=
p
.
controller
||
loaded_location
!=
p
.
location
)
if
(
loaded_controller
!=
p
.
controller
||
loaded_location
!=
p
.
location
)
{
loaded_controller
=
(
int
)
p
.
controller
;
loaded_location
=
(
int
)
p
.
location
;
...
...
@@ -1059,7 +1128,11 @@ public class gameCard : OCGobject
{
loc
=
GameStringHelper
.
chuwai
;
}
if
(!
SemiNomiSummoned
&&
(
data
.
Type
&
0x68020C0
)
>
0
&&
(
p
.
location
&
((
UInt32
)
CardLocation
.
Grave
+
(
UInt32
)
CardLocation
.
Removed
))
>
0
)
if
(
!
SemiNomiSummoned
&&
(
data
.
Type
&
0x68020C0
)
>
0
&&
(
p
.
location
&
((
UInt32
)
CardLocation
.
Grave
+
(
UInt32
)
CardLocation
.
Removed
))
>
0
)
{
loc
=
GameStringHelper
.
SemiNomi
;
}
...
...
@@ -1077,8 +1150,12 @@ public class gameCard : OCGobject
{
if
(
game_object_monster_cloude
==
null
)
{
game_object_monster_cloude
=
create
(
Program
.
I
().
mod_ocgcore_card_cloude
,
gameObject
.
transform
.
position
);
game_object_monster_cloude_ParticleSystem
=
game_object_monster_cloude
.
GetComponent
<
ParticleSystem
>();
game_object_monster_cloude
=
create
(
Program
.
I
().
mod_ocgcore_card_cloude
,
gameObject
.
transform
.
position
);
game_object_monster_cloude_ParticleSystem
=
game_object_monster_cloude
.
GetComponent
<
ParticleSystem
>();
}
}
else
...
...
@@ -1094,71 +1171,80 @@ public class gameCard : OCGobject
{
if
(
game_object_monster_cloude_ParticleSystem
!=
null
)
{
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject
.
transform
.
position
);
game_object_monster_cloude
.
transform
.
position
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
+
3
));
game_object_monster_cloude_ParticleSystem
.
startSize
=
UnityEngine
.
Random
.
Range
(
3f
,
3f
+
(
20f
-
3f
)
*
(
float
)(
Mathf
.
Clamp
(
data
.
Attack
,
0
,
3000
))
/
3000f
);
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject
.
transform
.
position
);
game_object_monster_cloude
.
transform
.
position
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
+
3
)
);
game_object_monster_cloude_ParticleSystem
.
startSize
=
UnityEngine
.
Random
.
Range
(
3f
,
3f
+
(
20f
-
3f
)
*
(
float
)(
Mathf
.
Clamp
(
data
.
Attack
,
0
,
3000
))
/
3000f
);
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Earth
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
200f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
80f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Water
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Fire
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Wind
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Dark
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
158f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
158f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
158f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Light
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Divine
))
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
)
);
}
}
}
}
int
loaded_verticalDrawingCode
=
-
1
;
bool
loaded_verticalDrawingReal
=
false
;
float
loaded_verticalDrawingK
=
1
;
// bool picLikeASquare = false;
int
loaded_verticalDrawingNumber
=
-
1
;
int
loaded_verticalatk
=
-
1
;
...
...
@@ -1169,22 +1255,37 @@ public class gameCard : OCGobject
int
loaded_verticalOverAttribute
=
-
1
;
float
k_verticle
=
1
;
float
VerticleTransparency
=
1f
;
public
bool
opMonsterWithBackGroundCard
=
false
;
public
bool
opMonsterWithBackGroundCard
=
false
;
void
card_verticle_drawing_handler
()
{
if
(
game_object_verticle_drawing
==
null
||
loaded_verticalDrawingCode
!=
data
.
Id
||
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
if
(
game_object_verticle_drawing
==
null
||
loaded_verticalDrawingCode
!=
data
.
Id
||
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
{
if
(
Program
.
getVerticalTransparency
()
>
0.5f
)
{
Texture2D
texture
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_verticle_drawing
);
Texture2D
texture
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_verticle_drawing
);
if
(
texture
!=
null
)
{
loaded_verticalDrawingCode
=
data
.
Id
;
loaded_verticalDrawingK
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_verticle_drawing
);
loaded_verticalDrawingK
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_verticle_drawing
);
// picLikeASquare = GameTextureManager.getB(data.Id, GameTextureType.card_verticle_drawing);
if
(
game_object_verticle_drawing
==
null
)
{
game_object_verticle_drawing
=
create
(
Program
.
I
().
mod_simple_quad
,
gameObject
.
transform
.
position
,
new
Vector3
(
60
,
0
,
0
));
game_object_verticle_drawing
=
create
(
Program
.
I
().
mod_simple_quad
,
gameObject
.
transform
.
position
,
new
Vector3
(
60
,
0
,
0
)
);
VerticleTransparency
=
1f
;
}
if
(
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
...
...
@@ -1192,7 +1293,8 @@ public class gameCard : OCGobject
loaded_verticalDrawingReal
=
Program
.
getVerticalTransparency
()
>
0.5f
;
game_object_verticle_drawing
.
transform
.
localScale
=
Vector3
.
zero
;
}
game_object_verticle_drawing
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
texture
;
game_object_verticle_drawing
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
texture
;
k_verticle
=
(
float
)
texture
.
width
/
(
float
)
texture
.
height
;
}
}
...
...
@@ -1204,7 +1306,11 @@ public class gameCard : OCGobject
// picLikeASquare = true;
if
(
game_object_verticle_drawing
==
null
)
{
game_object_verticle_drawing
=
create
(
Program
.
I
().
mod_simple_quad
,
gameObject
.
transform
.
position
,
new
Vector3
(
60
,
0
,
0
));
game_object_verticle_drawing
=
create
(
Program
.
I
().
mod_simple_quad
,
gameObject
.
transform
.
position
,
new
Vector3
(
60
,
0
,
0
)
);
VerticleTransparency
=
1f
;
}
if
(
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
...
...
@@ -1212,7 +1318,8 @@ public class gameCard : OCGobject
loaded_verticalDrawingReal
=
Program
.
getVerticalTransparency
()
>
0.5f
;
game_object_verticle_drawing
.
transform
.
localScale
=
Vector3
.
zero
;
}
game_object_verticle_drawing
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
texture
;
game_object_verticle_drawing
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
texture
;
k_verticle
=
(
float
)
texture
.
width
/
(
float
)
texture
.
height
;
}
}
...
...
@@ -1236,12 +1343,17 @@ public class gameCard : OCGobject
{
trans
=
1
;
}
if
(
trans
!=
VerticleTransparency
)
if
(
trans
!=
VerticleTransparency
)
{
VerticleTransparency
=
trans
;
game_object_verticle_drawing
.
GetComponent
<
Renderer
>().
material
.
color
=
new
Color
(
1
,
1
,
1
,
trans
);
game_object_verticle_drawing
.
GetComponent
<
Renderer
>().
material
.
color
=
new
Color
(
1
,
1
,
1
,
trans
);
}
if
(
Program
.
getVerticalTransparency
()
<=
0.5f
||
opMonsterWithBackGroundCard
)
if
(
Program
.
getVerticalTransparency
()
<=
0.5f
||
opMonsterWithBackGroundCard
)
{
if
(
VerticleCollider
!=
null
)
{
...
...
@@ -1258,11 +1370,17 @@ public class gameCard : OCGobject
}
Vector3
want_scale
=
Vector3
.
zero
;
float
showscale
=
(
isMinBlockMode
?
4.2f
:
Program
.
verticleScale
)
/
loaded_verticalDrawingK
;
float
showscale
=
(
isMinBlockMode
?
4.2f
:
Program
.
verticleScale
)
/
loaded_verticalDrawingK
;
want_scale
=
new
Vector3
(
showscale
*
k_verticle
,
showscale
,
1
);
game_object_verticle_drawing
.
transform
.
position
=
get_verticle_drawing_vector
(
gameObject_face
.
transform
.
position
);
game_object_verticle_drawing
.
transform
.
localScale
+=
(
want_scale
-
game_object_verticle_drawing
.
transform
.
localScale
)
*
Program
.
deltaTime
*
10f
;
game_object_verticle_drawing
.
transform
.
position
=
get_verticle_drawing_vector
(
gameObject_face
.
transform
.
position
);
game_object_verticle_drawing
.
transform
.
localScale
+=
(
want_scale
-
game_object_verticle_drawing
.
transform
.
localScale
)
*
Program
.
deltaTime
*
10f
;
if
(
VerticleCollider
!=
null
)
{
...
...
@@ -1271,7 +1389,6 @@ public class gameCard : OCGobject
VerticleCollider
.
center
=
new
Vector3
(
0
,
-
0.5f
+
0.5f
*
h
,
0
);
}
int
color
=
0
;
if
((
data
.
Type
&
(
int
)
CardType
.
Tuner
)
>
0
)
...
...
@@ -1296,76 +1413,125 @@ public class gameCard : OCGobject
}
}
if
(
verticle_number
==
null
||
loaded_verticalDrawingNumber
!=
(
int
)
data
.
Level
||
loaded_verticalColor
!=
color
)
if
(
verticle_number
==
null
||
loaded_verticalDrawingNumber
!=
(
int
)
data
.
Level
||
loaded_verticalColor
!=
color
)
{
loaded_verticalDrawingNumber
=
(
int
)
data
.
Level
;
loaded_verticalColor
=
color
;
if
(
verticle_number
==
null
)
{
verticle_number
=
create
(
Program
.
I
().
new_ui_textMesh
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
),
true
,
null
,
true
,
new
Vector3
(
3
*
1.8f
*
0.04f
,
3
*
1.8f
*
0.04f
,
3
*
1.8f
*
0.04f
)).
GetComponent
<
TMPro
.
TextMeshPro
>();
verticle_number
=
create
(
Program
.
I
().
new_ui_textMesh
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
),
true
,
null
,
true
,
new
Vector3
(
3
*
1.8f
*
0.04f
,
3
*
1.8f
*
0.04f
,
3
*
1.8f
*
0.04f
)
)
.
GetComponent
<
TMPro
.
TextMeshPro
>();
}
if
(
game_object_verticle_Star
==
null
)
{
game_object_verticle_Star
=
create
(
Program
.
I
().
mod_simple_quad
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
),
true
,
null
,
true
,
new
Vector3
(
3
*
1.8f
*
0.17f
,
3
*
1.8f
*
0.17f
,
3
*
1.8f
*
0.17f
));
game_object_verticle_Star
=
create
(
Program
.
I
().
mod_simple_quad
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
),
true
,
null
,
true
,
new
Vector3
(
3
*
1.8f
*
0.17f
,
3
*
1.8f
*
0.17f
,
3
*
1.8f
*
0.17f
)
);
}
if
(
color
==
0
)
{
verticle_number
.
text
=
data
.
Level
.
ToString
();
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
L
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
L
;
}
if
(
color
==
1
)
{
verticle_number
.
text
=
"<#FFFF00>"
+
data
.
Level
.
ToString
()
+
"</color>"
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
L
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
L
;
}
if
(
color
==
2
)
{
verticle_number
.
text
=
"<#999999>"
+
data
.
Level
.
ToString
()
+
"</color>"
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
R
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
R
;
}
if
(
color
==
3
)
{
verticle_number
.
text
=
"<#E1FFFF>"
+
data
.
Level
.
ToString
()
+
"</color>"
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
LINK
;
game_object_verticle_Star
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
LINK
;
}
}
if
(
Program
.
getVerticalTransparency
()
<
0.5f
)
{
Vector3
screen_number_pos
;
screen_number_pos
=
2
*
gameObject_face
.
transform
.
position
-
cardHint
.
gameObject
.
transform
.
position
;
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
screen_number_pos
+
new
Vector3
(-
0.25f
,
0
,
-
0.7f
));
screen_number_pos
=
2
*
gameObject_face
.
transform
.
position
-
cardHint
.
gameObject
.
transform
.
position
;
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
screen_number_pos
+
new
Vector3
(-
0.25f
,
0
,
-
0.7f
)
);
screen_number_pos
.
z
-=
2f
;
verticle_number
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
verticle_number
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
if
(
game_object_verticle_Star
!=
null
)
{
screen_number_pos
=
2
*
gameObject_face
.
transform
.
position
-
cardHint
.
gameObject
.
transform
.
position
;
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
screen_number_pos
+
new
Vector3
(-
1.5f
,
0
,
-
0.7f
));
screen_number_pos
=
2
*
gameObject_face
.
transform
.
position
-
cardHint
.
gameObject
.
transform
.
position
;
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
screen_number_pos
+
new
Vector3
(-
1.5f
,
0
,
-
0.7f
)
);
screen_number_pos
.
z
-=
2f
;
game_object_verticle_Star
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
game_object_verticle_Star
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
}
}
else
{
Vector3
screen_number_pos
;
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
cardHint
.
gameObject
.
transform
.
position
+
new
Vector3
(-
0.61f
,
0.65f
,
0.65f
*
1.732f
));
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
cardHint
.
gameObject
.
transform
.
position
+
new
Vector3
(-
0.61f
,
0.65f
,
0.65f
*
1.732f
)
);
screen_number_pos
.
z
-=
2f
;
verticle_number
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
verticle_number
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
if
(
game_object_verticle_Star
!=
null
)
{
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
cardHint
.
gameObject
.
transform
.
position
+
new
Vector3
(-
1.86f
,
0.65f
,
0.65f
*
1.732f
));
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
cardHint
.
gameObject
.
transform
.
position
+
new
Vector3
(-
1.86f
,
0.65f
,
0.65f
*
1.732f
)
);
screen_number_pos
.
z
-=
2f
;
game_object_verticle_Star
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
game_object_verticle_Star
.
transform
.
position
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_number_pos
);
}
}
if
(
loaded_verticalatk
!=
data
.
Attack
||
loaded_verticaldef
!=
data
.
Defense
||
loaded_verticalpos
!=
p
.
position
||
loaded_verticalcon
!=
p
.
controller
)
if
(
loaded_verticalatk
!=
data
.
Attack
||
loaded_verticaldef
!=
data
.
Defense
||
loaded_verticalpos
!=
p
.
position
||
loaded_verticalcon
!=
p
.
controller
)
{
loaded_verticalatk
=
data
.
Attack
;
loaded_verticaldef
=
data
.
Defense
;
loaded_verticalpos
=
p
.
position
;
loaded_verticalcon
=
(
int
)
p
.
controller
;
if
((
data
.
Type
&(
uint
)
CardType
.
Link
)>
0
)
if
((
data
.
Type
&
(
uint
)
CardType
.
Link
)
>
0
)
{
string
raw
=
""
;
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
...
...
@@ -1381,9 +1547,16 @@ public class gameCard : OCGobject
{
raw
+=
data
.
Attack
.
ToString
();
}
if
(
p
.
sequence
==
5
||
p
.
sequence
==
6
)
if
(
p
.
sequence
==
5
||
p
.
sequence
==
6
)
{
raw
+=
"("
+
(
p
.
controller
==
0
?
GameStringHelper
.
_wofang
:
GameStringHelper
.
_duifang
)
+
")"
;
raw
+=
"("
+
(
p
.
controller
==
0
?
GameStringHelper
.
_wofang
:
GameStringHelper
.
_duifang
)
+
")"
;
}
set_text
(
raw
.
Replace
(
"-2"
,
"?"
));
}
...
...
@@ -1409,7 +1582,14 @@ public class gameCard : OCGobject
raw
+=
"<#888888>"
+
data
.
Defense
.
ToString
()
+
"</color>"
;
if
(
p
.
sequence
==
5
||
p
.
sequence
==
6
)
{
raw
+=
"("
+
(
p
.
controller
==
0
?
GameStringHelper
.
_wofang
:
GameStringHelper
.
_duifang
)
+
")"
;
raw
+=
"("
+
(
p
.
controller
==
0
?
GameStringHelper
.
_wofang
:
GameStringHelper
.
_duifang
)
+
")"
;
}
set_text
(
raw
.
Replace
(
"-2"
,
"?"
));
}
...
...
@@ -1431,13 +1611,18 @@ public class gameCard : OCGobject
}
if
(
p
.
sequence
==
5
||
p
.
sequence
==
6
)
{
raw
+=
"("
+
(
p
.
controller
==
0
?
GameStringHelper
.
_wofang
:
GameStringHelper
.
_duifang
)
+
")"
;
raw
+=
"("
+
(
p
.
controller
==
0
?
GameStringHelper
.
_wofang
:
GameStringHelper
.
_duifang
)
+
")"
;
}
set_text
(
raw
.
Replace
(
"-2"
,
"?"
));
}
}
}
}
}
...
...
@@ -1497,7 +1682,7 @@ public class gameCard : OCGobject
public
void
set_code
(
int
code
)
{
if
(
code
>
0
)
if
(
code
>
0
)
{
if
(
data
.
Id
!=
code
)
{
...
...
@@ -1505,7 +1690,7 @@ public class gameCard : OCGobject
data
.
Id
=
code
;
if
(
p
.
controller
==
1
)
{
if
(
Program
.
I
().
ocgcore
.
condition
==
Ocgcore
.
Condition
.
duel
)
if
(
Program
.
I
().
ocgcore
.
condition
==
Ocgcore
.
Condition
.
duel
)
{
if
(!
Program
.
I
().
ocgcore
.
sideReference
.
ContainsKey
(
code
))
{
...
...
@@ -1551,7 +1736,11 @@ public class gameCard : OCGobject
}
if
(
loaded_cardPictureCode
!=
data
.
Id
)
{
Texture2D
texture
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
,
p
.
controller
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
);
Texture2D
texture
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
,
p
.
controller
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
);
if
(
texture
!=
null
)
{
loaded_cardPictureCode
=
data
.
Id
;
...
...
@@ -1561,7 +1750,8 @@ public class gameCard : OCGobject
{
if
(
cardCodeChangedButNowLoadedPic
)
{
gameObject_face
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
unknown
;
gameObject_face
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
unknown
;
cardCodeChangedButNowLoadedPic
=
false
;
}
}
...
...
@@ -1571,10 +1761,18 @@ public class gameCard : OCGobject
try
{
loaded_back
=
(
int
)
p
.
controller
;
UIHelper
.
getByName
(
gameObject
,
"back"
).
GetComponent
<
Renderer
>().
material
.
mainTexture
=
loaded_back
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
;
UIHelper
.
getByName
(
gameObject
,
"back"
)
.
GetComponent
<
Renderer
>()
.
material
.
mainTexture
=
loaded_back
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
;
if
(
data
.
Id
==
0
)
{
UIHelper
.
getByName
(
gameObject
,
"face"
).
GetComponent
<
Renderer
>().
material
.
mainTexture
=
loaded_back
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
;
UIHelper
.
getByName
(
gameObject
,
"face"
)
.
GetComponent
<
Renderer
>()
.
material
.
mainTexture
=
loaded_back
==
0
?
GameTextureManager
.
myBack
:
GameTextureManager
.
opBack
;
}
del_one_tail
(
GameStringHelper
.
opHint
);
if
(
loaded_back
!=
controllerBased
)
...
...
@@ -1602,10 +1800,10 @@ public class gameCard : OCGobject
special_hint
=
2
;
}
}
if
(
loaded_specialHint
!=
special_hint
)
if
(
loaded_specialHint
!=
special_hint
)
{
loaded_specialHint
=
special_hint
;
if
(
loaded_specialHint
==
0
)
if
(
loaded_specialHint
==
0
)
{
del_one_tail
(
GameStringHelper
.
licechuwai
);
del_one_tail
(
GameStringHelper
.
biaoceewai
);
...
...
@@ -1725,24 +1923,25 @@ public class gameCard : OCGobject
{
want_position
=
facevector
;
want_position
.
y
+=
(
4.2f
/
loaded_verticalDrawingK
)
/
2f
*
0.5f
;
want_position
.
z
+=
((
4.2f
/
loaded_verticalDrawingK
)
/
2f
*
1.732f
*
0.5f
)
-
1.85f
;
want_position
.
z
+=
((
4.2f
/
loaded_verticalDrawingK
)
/
2f
*
1.732f
*
0.5f
)
-
1.85f
;
}
else
{
float
showscale
=
Program
.
verticleScale
;
want_position
=
facevector
;
want_position
.
y
+=
(
showscale
/
loaded_verticalDrawingK
)
/
2f
*
0.5f
;
want_position
.
z
+=
((
showscale
/
loaded_verticalDrawingK
)
/
2f
*
1.732f
*
0.5f
)
-
(
showscale
*
1.3f
/
3.6f
-
0.8f
);
want_position
.
z
+=
((
showscale
/
loaded_verticalDrawingK
)
/
2f
*
1.732f
*
0.5f
)
-
(
showscale
*
1.3f
/
3.6f
-
0.8f
);
}
return
want_position
;
}
#
endregion
#
region
publicTools
public
void
show_number
(
int
number
,
bool
add
=
false
)
public
void
show_number
(
int
number
,
bool
add
=
false
)
{
if
(
add
)
{
...
...
@@ -1858,7 +2057,14 @@ public class gameCard : OCGobject
List
<
cardDecoration
>
cardDecorations
=
new
List
<
cardDecoration
>();
public
cardDecoration
add_one_decoration
(
GameObject
mod
,
float
relative_position
,
Vector3
rotation
,
string
desctiption
,
bool
cookie
=
true
,
bool
up
=
false
)
public
cardDecoration
add_one_decoration
(
GameObject
mod
,
float
relative_position
,
Vector3
rotation
,
string
desctiption
,
bool
cookie
=
true
,
bool
up
=
false
)
{
cardDecoration
c
=
new
cardDecoration
();
c
.
desctiption
=
desctiption
;
...
...
@@ -1875,22 +2081,42 @@ public class gameCard : OCGobject
public
void
fast_decoration
(
GameObject
mod
)
{
destroy
(
add_one_decoration
(
mod
,
-
0.5f
,
Vector3
.
zero
,
""
,
false
).
game_object
,
5
);
destroy
(
add_one_decoration
(
mod
,
-
0.5f
,
Vector3
.
zero
,
""
,
false
).
game_object
,
5
);
}
public
void
animationEffect
(
GameObject
mod
)
{
MonoBehaviour
.
Destroy
((
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
UA_get_accurate_position
(),
Quaternion
.
identity
),
5f
);
MonoBehaviour
.
Destroy
(
(
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
UA_get_accurate_position
(),
Quaternion
.
identity
),
5f
);
}
public
void
positionEffect
(
GameObject
mod
)
{
MonoBehaviour
.
Destroy
((
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
Program
.
I
().
ocgcore
.
get_point_worldposition
(
p
),
Quaternion
.
identity
),
5f
);
MonoBehaviour
.
Destroy
(
(
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
Program
.
I
().
ocgcore
.
get_point_worldposition
(
p
),
Quaternion
.
identity
),
5f
);
}
public
void
positionShot
(
GameObject
mod
)
{
MonoBehaviour
.
Destroy
((
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
Program
.
I
().
ocgcore
.
get_point_worldposition
(
p
),
Quaternion
.
identity
),
1f
);
MonoBehaviour
.
Destroy
(
(
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
Program
.
I
().
ocgcore
.
get_point_worldposition
(
p
),
Quaternion
.
identity
),
1f
);
}
public
void
del_all_decoration_by_string
(
string
desctiption
)
...
...
@@ -1973,8 +2199,6 @@ public class gameCard : OCGobject
}
}
public
void
set_overlay_light
(
int
number
)
{
if
(
number
!=
0
)
...
...
@@ -2015,7 +2239,11 @@ public class gameCard : OCGobject
{
if
(
re
==
null
)
{
gameButton
button
=
new
gameButton
(
0
,
InterString
.
Get
(
"查看素材"
),
superButtonType
.
see
);
gameButton
button
=
new
gameButton
(
0
,
InterString
.
Get
(
"查看素材"
),
superButtonType
.
see
);
button
.
cookieString
=
"see_overlay"
;
button
.
notCookie
=
true
;
button
.
cookieCard
=
this
;
...
...
@@ -2049,8 +2277,8 @@ public class gameCard : OCGobject
GameObject
ret
=
null
;
ret
=
Program
.
I
().
create
(
mod
);
ret
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
ret
.
transform
.
localScale
=
new
Vector3
(
0.1f
/
3f
,
0.1f
,
0.1f
/
4f
);
ret
.
transform
.
localEulerAngles
=
new
Vector3
(
90
,
0
,
0
);
ret
.
transform
.
localScale
=
new
Vector3
(
0.1f
/
3f
,
0.1f
,
0.1f
/
4f
);
ret
.
transform
.
localEulerAngles
=
new
Vector3
(
90
,
0
,
0
);
return
ret
;
}
...
...
@@ -2058,7 +2286,10 @@ public class gameCard : OCGobject
{
FlashingController
flash
=
null
;
Program
.
camera_game_main
.
GetComponent
<
HighlightingEffect
>().
enabled
=
true
;
flash
=
Program
.
I
().
create
(
Program
.
I
().
mod_ocgcore_card_figure_line
).
GetComponent
<
FlashingController
>();
flash
=
Program
.
I
()
.
create
(
Program
.
I
().
mod_ocgcore_card_figure_line
)
.
GetComponent
<
FlashingController
>();
flash
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
flash
.
transform
.
localPosition
=
Vector3
.
zero
;
Color
tcl
=
Color
.
yellow
;
...
...
@@ -2072,9 +2303,10 @@ public class gameCard : OCGobject
public
void
flash_line_on
()
{
Program
.
camera_game_main
.
GetComponent
<
HighlightingEffect
>().
enabled
=
true
;
if
(
MouseFlash
==
null
)
if
(
MouseFlash
==
null
)
{
MouseFlash
=
create
(
Program
.
I
().
mod_ocgcore_card_figure_line
).
GetComponent
<
FlashingController
>();
MouseFlash
=
create
(
Program
.
I
().
mod_ocgcore_card_figure_line
)
.
GetComponent
<
FlashingController
>();
MouseFlash
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
MouseFlash
.
transform
.
localPosition
=
Vector3
.
zero
;
Color
tcl
=
Color
.
yellow
;
...
...
@@ -2099,7 +2331,8 @@ public class gameCard : OCGobject
public
void
p_line_on
()
{
Program
.
camera_game_main
.
GetComponent
<
HighlightingEffect
>().
enabled
=
true
;
if
(
p_line
!=
null
)
destroy
(
p_line
);
if
(
p_line
!=
null
)
destroy
(
p_line
);
p_line
=
create
(
Program
.
I
().
mod_ocgcore_card_figure_line
);
p_line
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
p_line
.
transform
.
localPosition
=
Vector3
.
zero
;
...
...
@@ -2121,28 +2354,50 @@ public class gameCard : OCGobject
#
region
animation
public
void
animation_confirm
(
Vector3
position
,
Vector3
rotation
,
float
time_move
,
float
time_still
)
public
void
animation_confirm
(
Vector3
position
,
Vector3
rotation
,
float
time_move
,
float
time_still
)
{
ES_lock
(
time_move
+
time_move
+
time_still
);
confirm_step_time_still
=
time_still
;
confirm_step_time_move
=
time_move
;
confirm_step_r
=
rotation
;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
position
.
x
,
"y"
,
position
.
y
,
"z"
,
position
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_2
,
"time"
,
confirm_step_time_move
));
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"time"
,
confirm_step_time_move
));
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
position
.
x
,
"y"
,
position
.
y
,
"z"
,
position
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_2
,
"time"
,
confirm_step_time_move
)
);
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"time"
,
confirm_step_time_move
)
);
}
public
void
animation_confirm_screenCenter
(
Vector3
rotation
,
float
time_move
,
float
time_still
)
...
...
@@ -2152,16 +2407,27 @@ public class gameCard : OCGobject
confirm_step_time_move
=
time_move
;
confirm_step_r
=
rotation
;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"easetype"
,
iTween
.
EaseType
.
spring
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_2
,
"time"
,
confirm_step_time_move
));
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"easetype"
,
iTween
.
EaseType
.
spring
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_2
,
"time"
,
confirm_step_time_move
)
);
var
ttt
=
gameObject
.
AddComponent
<
screenFader
>();
ttt
.
from
=
gameObject
.
transform
.
position
;
ttt
.
time
=
time_move
;
...
...
@@ -2177,32 +2443,57 @@ public class gameCard : OCGobject
void
confirm_step_2
()
{
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_3
,
"time"
,
confirm_step_time_still
));
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_3
,
"time"
,
confirm_step_time_still
)
);
}
void
confirm_step_3
()
{
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
accurate_rotation
.
x
,
"y"
,
accurate_rotation
.
y
,
"z"
,
accurate_rotation
.
z
,
"time"
,
confirm_step_time_move
));
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
accurate_position
.
x
,
"y"
,
accurate_position
.
y
,
"z"
,
accurate_position
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"time"
,
confirm_step_time_move
,
"easetype"
,
iTween
.
EaseType
.
easeInQuad
));
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
accurate_rotation
.
x
,
"y"
,
accurate_rotation
.
y
,
"z"
,
accurate_rotation
.
z
,
"time"
,
confirm_step_time_move
)
);
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
accurate_position
.
x
,
"y"
,
accurate_position
.
y
,
"z"
,
accurate_position
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"time"
,
confirm_step_time_move
,
"easetype"
,
iTween
.
EaseType
.
easeInQuad
)
);
}
public
void
animation_shake_to
(
float
time
)
...
...
@@ -2211,17 +2502,25 @@ public class gameCard : OCGobject
gameObject
.
transform
.
position
=
accurate_position
;
gameObject
.
transform
.
eulerAngles
=
accurate_rotation
;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
iTween
.
ShakePosition
(
gameObject
,
iTween
.
Hash
(
"x"
,
1
,
"y"
,
1
,
"z"
,
1
,
"time"
,
time
,
"oncomplete"
,
(
Action
)
ES_safe_card_move_to_original_place
));
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
iTween
.
ShakePosition
(
gameObject
,
iTween
.
Hash
(
"x"
,
1
,
"y"
,
1
,
"z"
,
1
,
"time"
,
time
,
"oncomplete"
,
(
Action
)
ES_safe_card_move_to_original_place
)
);
}
public
void
animation_rush_to
(
Vector3
position
,
Vector3
rotation
)
{
ES_lock
(
0.4f
);
...
...
@@ -2229,20 +2528,27 @@ public class gameCard : OCGobject
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
MonoBehaviour
.
DestroyImmediate
(
gameObject
.
GetComponent
<
screenFader
>());
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
position
.
x
,
"y"
,
position
.
y
,
"z"
,
position
.
z
,
"time"
,
0.2f
));
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
rotation
.
x
,
"y"
,
rotation
.
y
,
"z"
,
rotation
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
ES_safe_card_move_to_original_place
,
"time"
,
0.21f
));
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
position
.
x
,
"y"
,
position
.
y
,
"z"
,
position
.
z
,
"time"
,
0.2f
)
);
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
rotation
.
x
,
"y"
,
rotation
.
y
,
"z"
,
rotation
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
ES_safe_card_move_to_original_place
,
"time"
,
0.21f
)
);
}
public
void
animation_show_off
(
bool
summon
,
bool
disabled
=
false
)
...
...
@@ -2263,7 +2569,11 @@ public class gameCard : OCGobject
}
else
if
(
show_off_shokewave
)
{
if
(
Program
.
I
().
setting
.
setting
.
showoff
.
value
==
false
||
File
.
Exists
(
"picture/closeup/"
+
data
.
Id
.
ToString
()
+
".png"
)
==
false
||
(
data
.
Attack
<
Program
.
I
().
setting
.
atk
&&
data
.
Level
<
Program
.
I
().
setting
.
star
))
if
(
Program
.
I
().
setting
.
setting
.
showoff
.
value
==
false
||
File
.
Exists
(
"picture/closeup/"
+
data
.
Id
.
ToString
()
+
".png"
)
==
false
||
(
data
.
Attack
<
Program
.
I
().
setting
.
atk
&&
data
.
Level
<
Program
.
I
().
setting
.
star
)
)
{
refreshFunctions
.
Add
(
SOH_nSum
);
Program
.
I
().
ocgcore
.
Sleep
(
30
);
...
...
@@ -2276,7 +2586,10 @@ public class gameCard : OCGobject
}
else
{
if
(
Program
.
I
().
setting
.
setting
.
showoffWhenActived
.
value
==
false
||
File
.
Exists
(
"picture/closeup/"
+
data
.
Id
.
ToString
()
+
".png"
)
==
false
)
if
(
Program
.
I
().
setting
.
setting
.
showoffWhenActived
.
value
==
false
||
File
.
Exists
(
"picture/closeup/"
+
data
.
Id
.
ToString
()
+
".png"
)
==
false
)
{
refreshFunctions
.
Add
(
SOH_nAct
);
Program
.
I
().
ocgcore
.
Sleep
(
42
);
...
...
@@ -2305,11 +2618,21 @@ public class gameCard : OCGobject
{
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
refreshFunctions
.
Remove
(
SOH_act
);
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShowerA
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
).
GetComponent
<
YGO1superShower
>();
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShowerA
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
)
.
GetComponent
<
YGO1superShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
(
int
)(
500f
/
k
);
shower
.
closeup
.
width
=
(
int
)((
500f
/
k
)
*
((
float
)
texc
.
width
)
/
((
float
)
texc
.
height
));
shower
.
closeup
.
width
=
(
int
)(
(
500f
/
k
)
*
((
float
)
texc
.
width
)
/
((
float
)
texc
.
height
)
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
}
...
...
@@ -2322,12 +2645,24 @@ public class gameCard : OCGobject
if
(
tex
!=
null
)
{
refreshFunctions
.
Remove
(
SOH_nAct
);
pro1CardShower
shower
=
create
(
Program
.
I
().
Pro1_CardShower
,
Program
.
I
().
ocgcore
.
centre
(),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
).
GetComponent
<
pro1CardShower
>();
pro1CardShower
shower
=
create
(
Program
.
I
().
Pro1_CardShower
,
Program
.
I
().
ocgcore
.
centre
(),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
)
.
GetComponent
<
pro1CardShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
shower
.
gameObject
.
transform
.
localScale
=
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
);
shower
.
gameObject
.
transform
.
localScale
=
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
);
shower
.
run
();
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
...
...
@@ -2344,11 +2679,21 @@ public class gameCard : OCGobject
{
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
refreshFunctions
.
Remove
(
SOH_sum
);
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShower
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
).
GetComponent
<
YGO1superShower
>();
YGO1superShower
shower
=
create
(
Program
.
I
().
Pro1_superCardShower
,
Program
.
I
().
ocgcore
.
centre
(
true
),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
)
.
GetComponent
<
YGO1superShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
(
int
)(
500f
/
k
);
shower
.
closeup
.
width
=
(
int
)((
500f
/
k
)
*
((
float
)
texc
.
width
)
/
((
float
)
texc
.
height
));
shower
.
closeup
.
width
=
(
int
)(
(
500f
/
k
)
*
((
float
)
texc
.
width
)
/
((
float
)
texc
.
height
)
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
2f
,
false
,
true
);
}
...
...
@@ -2361,17 +2706,28 @@ public class gameCard : OCGobject
if
(
tex
!=
null
)
{
refreshFunctions
.
Remove
(
SOH_nSum
);
pro1CardShower
shower
=
create
(
Program
.
I
().
Pro1_CardShower
,
Program
.
I
().
ocgcore
.
centre
(),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
).
GetComponent
<
pro1CardShower
>();
pro1CardShower
shower
=
create
(
Program
.
I
().
Pro1_CardShower
,
Program
.
I
().
ocgcore
.
centre
(),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
)
.
GetComponent
<
pro1CardShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
iTween
.
ScaleTo
(
shower
.
gameObject
,
iTween
.
Hash
(
iTween
.
ScaleTo
(
shower
.
gameObject
,
iTween
.
Hash
(
"scale"
,
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
),
"time"
,
0.5f
));
)
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.5f
,
false
,
true
);
}
...
...
@@ -2383,12 +2739,24 @@ public class gameCard : OCGobject
if
(
tex
!=
null
)
{
refreshFunctions
.
Remove
(
SOH_dis
);
pro1CardShower
shower
=
create
(
Program
.
I
().
Pro1_CardShower
,
Program
.
I
().
ocgcore
.
centre
(),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
).
GetComponent
<
pro1CardShower
>();
pro1CardShower
shower
=
create
(
Program
.
I
().
Pro1_CardShower
,
Program
.
I
().
ocgcore
.
centre
(),
Vector3
.
zero
,
false
,
Program
.
ui_main_2d
,
true
)
.
GetComponent
<
pro1CardShower
>();
shower
.
card
.
mainTexture
=
tex
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
shower
.
gameObject
.
transform
.
localScale
=
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
);
shower
.
gameObject
.
transform
.
localScale
=
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
);
shower
.
Dis
();
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
...
...
@@ -2397,10 +2765,12 @@ public class gameCard : OCGobject
public
void
sortButtons
()
{
buttons
.
Sort
((
left
,
right
)
=>
buttons
.
Sort
(
(
left
,
right
)
=>
{
return
getButtonGravity
(
right
)
-
getButtonGravity
(
left
);
});
}
);
}
int
getButtonGravity
(
gameButton
left
)
...
...
@@ -2446,7 +2816,7 @@ public class gameCard : OCGobject
if
(
chains
[
i
].
G
!=
null
)
{
Program
.
I
().
ocgcore
.
allChainPanelFixedContainer
.
Remove
(
chains
[
i
].
G
.
gameObject
);
chains
[
i
].
G
.
transform
.
SetParent
(
Program
.
I
().
transform
,
true
);
chains
[
i
].
G
.
transform
.
SetParent
(
Program
.
I
().
transform
,
true
);
}
}
}
...
...
@@ -2483,12 +2853,12 @@ public class gameCard : OCGobject
Vector3
devide
=
game_object_verticle_drawing
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
{
decorationChain
.
transform
.
localScale
=
(
new
Vector3
(
5f
/
devide
.
x
,
5f
/
devide
.
y
,
5f
/
devide
.
z
));
}
decorationChain
.
transform
.
localScale
=
(
new
Vector3
(
5f
/
devide
.
x
,
5f
/
devide
.
y
,
5f
/
devide
.
z
)
);
}
catch
(
Exception
)
{
}
catch
(
Exception
)
{
}
}
else
{
...
...
@@ -2511,12 +2881,12 @@ public class gameCard : OCGobject
Vector3
devide
=
gameObject_face
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
{
decorationChain
.
transform
.
localScale
=
(
new
Vector3
(
5f
/
devide
.
x
,
5f
/
devide
.
y
,
5f
/
devide
.
z
));
}
decorationChain
.
transform
.
localScale
=
(
new
Vector3
(
5f
/
devide
.
x
,
5f
/
devide
.
y
,
5f
/
devide
.
z
)
);
}
catch
(
Exception
)
{
}
catch
(
Exception
)
{
}
}
else
{
...
...
@@ -2530,20 +2900,41 @@ public class gameCard : OCGobject
{
if
(
ballChain
==
null
)
{
ballChain
=
add_one_decoration
(
Program
.
I
().
mod_ocgcore_cs_chaining
,
3
,
Vector3
.
zero
,
"chaining"
,
false
).
game_object
;
ballChain
.
GetComponent
<
slowFade
>().
yse
=
(
condition
!=
gameCardCondition
.
verticle_clickable
||
Program
.
getVerticalTransparency
()
<
0.5f
);
ballChain
=
add_one_decoration
(
Program
.
I
().
mod_ocgcore_cs_chaining
,
3
,
Vector3
.
zero
,
"chaining"
,
false
).
game_object
;
ballChain
.
GetComponent
<
slowFade
>().
yse
=
(
condition
!=
gameCardCondition
.
verticle_clickable
||
Program
.
getVerticalTransparency
()
<
0.5f
);
}
}
}
else
{
if
(
ballChain
!=
null
)
if
(
ballChain
!=
null
)
{
del_all_decoration_by_string
(
"chaining"
);
Vector3
pos
=
UIHelper
.
get_close
(
gameObject
.
transform
.
position
,
Program
.
camera_game_main
,
5
);
Vector3
pos
=
UIHelper
.
get_close
(
gameObject
.
transform
.
position
,
Program
.
camera_game_main
,
5
);
if
(
Program
.
I
().
setting
.
setting
.
Vchain
.
value
==
true
)
{
MonoBehaviour
.
Destroy
((
GameObject
)
MonoBehaviour
.
Instantiate
(
Program
.
I
().
mod_ocgcore_cs_end
,
pos
,
Quaternion
.
identity
),
5f
);
MonoBehaviour
.
Destroy
(
(
GameObject
)
MonoBehaviour
.
Instantiate
(
Program
.
I
().
mod_ocgcore_cs_end
,
pos
,
Quaternion
.
identity
),
5f
);
}
if
(
ballChain
!=
null
)
{
...
...
@@ -2603,7 +2994,7 @@ public class gameCard : OCGobject
if
(
chains
.
Count
>
0
)
{
chainMono
decorationChain
=
chains
[
chains
.
Count
-
1
].
G
;
if
(
decorationChain
!=
null
)
if
(
decorationChain
!=
null
)
{
if
(
Program
.
I
().
ocgcore
.
inTheWorld
())
{
...
...
@@ -2622,7 +3013,7 @@ public class gameCard : OCGobject
public
void
CS_removeAllChainNumber
()
{
while
(
chains
.
Count
>
0
)
while
(
chains
.
Count
>
0
)
{
CS_removeOneChainNumber
();
}
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
645bee95
...
...
@@ -29,6 +29,8 @@ public class Ocgcore : ServantWithCardDescription
bool
flagForCancleChain
=
false
;
private
List
<
gameCard
>
chainCards
=
new
List
<
gameCard
>();
public
float
getScreenCenter
()
{
return
((
float
)
Screen
.
width
+
Program
.
I
().
cardDescription
.
width
-
gameInfo
.
width
)
/
2f
;
...
...
@@ -1195,11 +1197,21 @@ public class Ocgcore : ServantWithCardDescription
r
.
ReadChar
();
int
count
=
r
.
ReadByte
();
int
spcount
=
r
.
ReadByte
();
int
forced
=
r
.
ReadByte
();
int
hint0
=
r
.
ReadInt32
();
int
hint1
=
r
.
ReadInt32
();
bool
ignore
=
false
;
if
(
forced
==
0
)
bool
forced
=
false
;
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
r
.
ReadByte
();
// flag
int
f
=
r
.
ReadByte
();
// forced
if
(
f
==
1
)
forced
=
true
;
r
.
ReadInt32
();
// card id
r
.
ReadGPS
();
r
.
ReadInt32
();
// desc
}
if
(!
forced
)
{
var
condition
=
gameInfo
.
get_condition
();
if
(
condition
==
gameInfo
.
chainCondition
.
no
)
...
...
@@ -2394,6 +2406,7 @@ public class Ocgcore : ServantWithCardDescription
break
;
case
GameMessage
.
ConfirmCards
:
player
=
localPlayer
(
r
.
ReadByte
());
bool
skip_panel
=
r
.
ReadByte
()
==
1
;
count
=
r
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
...
...
@@ -2957,7 +2970,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
void
practicalizeMessage
(
Package
p
)
private
void
practicalizeMessage
(
Package
p
)
{
int
player
=
0
;
int
count
=
0
;
...
...
@@ -3896,17 +3909,16 @@ public class Ocgcore : ServantWithCardDescription
player
=
localPlayer
(
r
.
ReadChar
());
count
=
r
.
ReadByte
();
int
spcount
=
r
.
ReadByte
();
int
forced
=
r
.
ReadByte
();
int
hint0
=
r
.
ReadInt32
();
int
hint1
=
r
.
ReadInt32
();
List
<
gameCard
>
chainCards
=
new
List
<
gameCard
>();
chainCards
=
new
List
<
gameCard
>();
var
forceCount
=
0
;
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
int
flag
=
0
;
if
(
length_of_message
%
12
!=
0
)
{
flag
=
r
.
ReadChar
();
}
var
flag
=
r
.
ReadChar
();
var
forced
=
r
.
ReadByte
();
forceCount
+=
forced
;
code
=
r
.
ReadInt32
()
%
1000000000
;
gps
=
r
.
ReadGPS
();
desc
=
GameStringManager
.
get
(
r
.
ReadInt32
());
...
...
@@ -3920,12 +3932,13 @@ public class Ocgcore : ServantWithCardDescription
eff
.
flag
=
flag
;
eff
.
ptr
=
i
;
eff
.
desc
=
desc
;
eff
.
forced
=
forced
>
0
;
card
.
effects
.
Add
(
eff
);
}
}
var
chain_condition
=
gameInfo
.
get_condition
();
int
handle_flag
=
0
;
if
(
force
d
==
0
)
if
(
force
Count
==
0
)
{
//无强制发动的卡
if
(
spcount
==
0
)
...
...
@@ -4149,8 +4162,23 @@ public class Ocgcore : ServantWithCardDescription
if
(
handle_flag
==
4
)
{
//有一张强制发动的卡 回应--
var
answer
=
-
1
;
foreach
(
var
ccard
in
chainCards
)
{
foreach
(
var
effect
in
ccard
.
effects
)
{
if
(
effect
.
forced
)
{
answer
=
effect
.
ptr
;
break
;
}
}
if
(
answer
>=
0
)
break
;
}
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
(
Int32
)(
chainCards
[
0
].
effects
[
0
].
ptr
)
);
binaryMaster
.
writer
.
Write
(
answer
>=
0
?
answer
:
0
);
sendReturn
(
binaryMaster
.
get
());
}
break
;
...
...
@@ -4376,6 +4404,12 @@ public class Ocgcore : ServantWithCardDescription
card
.
selectPtr
=
i
;
card
.
levelForSelect_1
=
para
&
0xffff
;
card
.
levelForSelect_2
=
para
>>
16
;
if
((
para
&
0x80000000
)
>
0
)
{
card
.
levelForSelect_1
=
para
&
0x7fffffff
;
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
}
if
(
card
.
levelForSelect_2
==
0
)
{
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
...
...
@@ -4399,6 +4433,11 @@ public class Ocgcore : ServantWithCardDescription
card
.
selectPtr
=
i
;
card
.
levelForSelect_1
=
para
&
0xffff
;
card
.
levelForSelect_2
=
para
>>
16
;
if
((
para
&
0x80000000
)
>
0
)
{
card
.
levelForSelect_1
=
para
&
0x7fffffff
;
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
}
if
(
card
.
levelForSelect_2
==
0
)
{
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
...
...
@@ -4688,6 +4727,7 @@ public class Ocgcore : ServantWithCardDescription
break
;
case
GameMessage
.
ConfirmCards
:
player
=
localPlayer
(
r
.
ReadByte
());
var
skip_panel
=
r
.
ReadByte
()
==
1
;
count
=
r
.
ReadByte
();
int
t2
=
0
;
int
t3
=
0
;
...
...
@@ -4783,6 +4823,12 @@ public class Ocgcore : ServantWithCardDescription
t2
=
0
;
clearResponse
();
}
else
if
(
skip_panel
)
{
Sleep
(
t2
);
t2
=
0
;
clearResponse
();
}
}
Sleep
(
t2
);
break
;
...
...
@@ -9753,8 +9799,23 @@ public class Ocgcore : ServantWithCardDescription
autoForceChainHandler
=
autoForceChainHandlerType
.
autoHandleAll
;
try
{
var
answer
=
-
1
;
foreach
(
var
card
in
chainCards
)
{
foreach
(
var
effect
in
card
.
effects
)
{
if
(
effect
.
forced
)
{
answer
=
effect
.
ptr
;
break
;
}
}
if
(
answer
>=
0
)
break
;
}
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
0
);
binaryMaster
.
writer
.
Write
(
answer
>=
0
?
answer
:
0
);
sendReturn
(
binaryMaster
.
get
());
}
catch
(
System
.
Exception
e
)
...
...
Assets/SibylSystem/Program.cs
View file @
645bee95
...
...
@@ -338,7 +338,7 @@ public class Program : MonoBehaviour
#elif UNITY_IPHONE //iPhone
string
GamePaths
=
Application
.
persistentDataPath
+
"/ygopro2/"
;
if
(!
File
.
Exists
(
GamePaths
+
"updates/version-1.036.
1-Otokaz
e.txt"
))
if
(!
File
.
Exists
(
GamePaths
+
"updates/version-1.036.
2-TCub
e.txt"
))
{
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygopro2-data.zip"
;
ExtractZipFile
(
System
.
IO
.
File
.
ReadAllBytes
(
filePath
),
GamePaths
);
...
...
@@ -1195,7 +1195,7 @@ public class Program : MonoBehaviour
FPS
=
FPS
.
Substring
(
0
,
5
);
}
catch
{
}
GUI
.
Label
(
new
Rect
(
10
,
5
,
200
,
200
),
"[Ver 1.036.
1-Otokaz
e] "
+
"FPS: "
+
FPS
);
GUI
.
Label
(
new
Rect
(
10
,
5
,
200
,
200
),
"[Ver 1.036.
2-TCub
e] "
+
"FPS: "
+
FPS
);
}
void
Update
()
...
...
Assets/StreamingAssets/ygopro2-data.zip
View file @
645bee95
No preview for this file type
Assets/YGOSharp/Enums/CtosMessage.cs
View file @
645bee95
...
...
@@ -13,11 +13,12 @@
Surrender
=
0x14
,
TimeConfirm
=
0x15
,
Chat
=
0x16
,
ExternalAddress
=
0x17
,
HsToDuelist
=
0x20
,
HsToObserver
=
0x21
,
HsReady
=
0x22
,
HsNotReady
=
0x23
,
HsKick
=
0x24
,
HsStart
=
0x25
HsStart
=
0x25
,
}
}
Assets/transUI/prefab/trans_menu.prefab
View file @
645bee95
...
...
@@ -1417,7 +1417,7 @@ MonoBehaviour:
keepCrispWhenShrunk
:
1
mTrueTypeFont
:
{
fileID
:
12800000
,
guid
:
f775853fdfd14bb47934543e95c3bae3
,
type
:
3
}
mFont
:
{
fileID
:
0
}
mText
:
KoishiPro2 iOS 1.036.
1-Otokaz
e
mText
:
KoishiPro2 iOS 1.036.
2-tcub
e
mFontSize
:
18
mFontStyle
:
0
mAlignment
:
1
...
...
ProjectSettings/ProjectSettings.asset
View file @
645bee95
...
...
@@ -126,7 +126,7 @@ PlayerSettings:
16:10:
1
16:9:
1
Others
:
1
bundleVersion
:
1.036.
1-Otokaz
e
bundleVersion
:
1.036.
2-TCub
e
preloadedAssets
:
[]
metroInputSource
:
0
wsaTransparentSwapchain
:
0
...
...
ygopro2-data/updates/version-1.036.
1-Otokaz
e.txt
→
ygopro2-data/updates/version-1.036.
2-TCub
e.txt
View file @
645bee95
File moved
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