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
Hide 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
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
public
static
class
Config
public
static
class
Config
{
{
public
static
uint
ClientVersion
=
0x136
1
;
public
static
uint
ClientVersion
=
0x136
2
;
class
oneString
class
oneString
{
{
...
@@ -13,7 +14,7 @@ public static class Config
...
@@ -13,7 +14,7 @@ public static class Config
static
List
<
oneString
>
translations
=
new
List
<
oneString
>();
static
List
<
oneString
>
translations
=
new
List
<
oneString
>();
static
List
<
oneString
>
uits
=
new
List
<
oneString
>();
static
List
<
oneString
>
uits
=
new
List
<
oneString
>();
static
string
path
;
static
string
path
;
...
@@ -24,7 +25,7 @@ public static class Config
...
@@ -24,7 +25,7 @@ public static class Config
public
static
void
initialize
(
string
path
)
public
static
void
initialize
(
string
path
)
{
{
Config
.
path
=
path
;
Config
.
path
=
path
;
if
(
File
.
Exists
(
path
)
==
false
)
if
(
File
.
Exists
(
path
)
==
false
)
{
{
File
.
Create
(
path
).
Close
();
File
.
Create
(
path
).
Close
();
...
@@ -51,7 +52,10 @@ public static class Config
...
@@ -51,7 +52,10 @@ public static class Config
if
(
loaded
==
false
)
if
(
loaded
==
false
)
{
{
loaded
=
true
;
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
++)
for
(
int
i
=
0
;
i
<
lines
.
Length
;
i
++)
{
{
string
[]
mats
=
lines
[
i
].
Split
(
"="
);
string
[]
mats
=
lines
[
i
].
Split
(
"="
);
...
@@ -83,18 +87,16 @@ public static class Config
...
@@ -83,18 +87,16 @@ public static class Config
{
{
getted
=
Int32
.
Parse
(
Get
(
v
,
"0"
));
getted
=
Int32
.
Parse
(
Get
(
v
,
"0"
));
}
}
catch
(
Exception
)
catch
(
Exception
)
{
}
{
}
return
((
float
)
getted
)
/
100000f
;
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
;
string
return_value
=
defau
;
bool
finded
=
false
;
bool
finded
=
false
;
...
@@ -122,7 +124,7 @@ public static class Config
...
@@ -122,7 +124,7 @@ public static class Config
return
return_value
;
return
return_value
;
}
}
public
static
void
Set
(
string
original
,
string
setted
)
public
static
void
Set
(
string
original
,
string
setted
)
{
{
bool
finded
=
false
;
bool
finded
=
false
;
for
(
int
i
=
0
;
i
<
translations
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
translations
.
Count
;
i
++)
...
...
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
View file @
645bee95
...
@@ -40,6 +40,7 @@ public static class TcpHelper
...
@@ -40,6 +40,7 @@ public static class TcpHelper
networkStream
=
tcpClient
.
GetStream
();
networkStream
=
tcpClient
.
GetStream
();
Thread
t
=
new
Thread
(
receiver
);
Thread
t
=
new
Thread
(
receiver
);
t
.
Start
();
t
.
Start
();
CtosMessage_ExternalAddress
(
ipString
);
CtosMessage_PlayerInfo
(
name
);
CtosMessage_PlayerInfo
(
name
);
if
(
pswString
==
"L"
)
if
(
pswString
==
"L"
)
{
{
...
@@ -363,6 +364,15 @@ public static class TcpHelper
...
@@ -363,6 +364,15 @@ public static class TcpHelper
Send
(
message
);
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
)
public
static
void
CtosMessage_PlayerInfo
(
string
name
)
{
{
Package
message
=
new
Package
();
Package
message
=
new
Package
();
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
View file @
645bee95
...
@@ -12,19 +12,20 @@ public enum gameCardCondition
...
@@ -12,19 +12,20 @@ public enum gameCardCondition
verticle_clickable
=
3
,
verticle_clickable
=
3
,
}
}
public
struct
GPS
public
struct
GPS
{
{
public
UInt32
controller
;
public
UInt32
controller
;
public
UInt32
location
;
public
UInt32
location
;
public
UInt32
sequence
;
public
UInt32
sequence
;
public
int
position
;
public
int
position
;
}
}
public
class
Effect
public
class
Effect
{
{
public
int
ptr
;
public
int
ptr
;
public
string
desc
;
public
string
desc
;
public
int
flag
;
public
int
flag
;
public
bool
forced
=
false
;
}
}
public
class
gameCard
:
OCGobject
public
class
gameCard
:
OCGobject
...
@@ -53,7 +54,7 @@ public class gameCard : OCGobject
...
@@ -53,7 +54,7 @@ public class gameCard : OCGobject
}
}
}
}
public
void
removeTarget
(
gameCard
card_
)
public
void
removeTarget
(
gameCard
card_
)
{
{
target
.
Remove
(
card_
);
target
.
Remove
(
card_
);
}
}
...
@@ -101,7 +102,7 @@ public class gameCard : OCGobject
...
@@ -101,7 +102,7 @@ public class gameCard : OCGobject
TMPro
.
TextMeshPro
verticle_number
=
null
;
TMPro
.
TextMeshPro
verticle_number
=
null
;
GameObject
game_object_verticle_Star
=
null
;
GameObject
game_object_verticle_Star
=
null
;
GameObject
game_object_monster_cloude
=
null
;
GameObject
game_object_monster_cloude
=
null
;
...
@@ -121,7 +122,7 @@ public class gameCard : OCGobject
...
@@ -121,7 +122,7 @@ public class gameCard : OCGobject
public
gameCard
()
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_face
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"face"
).
gameObject
;
gameObject_back
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"back"
).
gameObject
;
gameObject_back
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"back"
).
gameObject
;
gameObject_event_main
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"event"
).
gameObject
;
gameObject_event_main
=
gameObject
.
transform
.
Find
(
"card"
).
Find
(
"event"
).
gameObject
;
...
@@ -140,7 +141,6 @@ public class gameCard : OCGobject
...
@@ -140,7 +141,6 @@ public class gameCard : OCGobject
selectKuang
.
SetActive
(
false
);
selectKuang
.
SetActive
(
false
);
chainKuang
.
SetActive
(
false
);
chainKuang
.
SetActive
(
false
);
gameObject
.
SetActive
(
false
);
gameObject
.
SetActive
(
false
);
}
}
public
bool
forceRefreshCondition
=
false
;
public
bool
forceRefreshCondition
=
false
;
...
@@ -207,7 +207,7 @@ public class gameCard : OCGobject
...
@@ -207,7 +207,7 @@ public class gameCard : OCGobject
controller
=
0
,
controller
=
0
,
location
=
0
,
location
=
0
,
position
=
0
,
position
=
0
,
sequence
=
0
sequence
=
0
,
};
};
CS_clear
();
CS_clear
();
}
}
...
@@ -229,19 +229,24 @@ public class gameCard : OCGobject
...
@@ -229,19 +229,24 @@ public class gameCard : OCGobject
}
}
}
}
GameObject
nagaSign
=
null
;
GameObject
nagaSign
=
null
;
public
bool
disabled
=
false
;
public
bool
disabled
=
false
;
public
bool
SemiNomiSummoned
=
false
;
public
bool
SemiNomiSummoned
=
false
;
public
enum
flashType
public
enum
flashType
{
{
SpSummon
,
Active
,
Select
,
none
SpSummon
,
Active
,
Select
,
none
,
}
}
public
enum
kuangType
public
enum
kuangType
{
{
selected
,
chaining
,
none
selected
,
chaining
,
none
,
}
}
public
flashType
currentFlash
=
flashType
.
none
;
public
flashType
currentFlash
=
flashType
.
none
;
...
@@ -250,11 +255,14 @@ public class gameCard : OCGobject
...
@@ -250,11 +255,14 @@ public class gameCard : OCGobject
flashType
currentFlashPre
=
flashType
.
none
;
flashType
currentFlashPre
=
flashType
.
none
;
kuangType
currentKuangPre
=
kuangType
.
none
;
kuangType
currentKuangPre
=
kuangType
.
none
;
FlashingController
[]
SpSummonFlash
,
ActiveFlash
,
SelectFlash
;
FlashingController
[]
SpSummonFlash
,
ActiveFlash
,
SelectFlash
;
GameObject
selectKuang
,
chainKuang
;
GameObject
selectKuang
,
chainKuang
;
FlashingController
MouseFlash
;
FlashingController
MouseFlash
;
...
@@ -272,30 +280,53 @@ public class gameCard : OCGobject
...
@@ -272,30 +280,53 @@ public class gameCard : OCGobject
Vector3
screenposition
=
Vector3
.
zero
;
Vector3
screenposition
=
Vector3
.
zero
;
if
(
cardDecorations
[
i
].
up_of_card
)
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
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
.
eulerAngles
=
cardDecorations
[
i
].
rotation
;
cardDecorations
[
i
].
game_object
.
transform
.
position
=
worldposition
;
cardDecorations
[
i
].
game_object
.
transform
.
position
=
worldposition
;
if
(
cardDecorations
[
i
].
scale_change_ignored
==
false
)
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
++)
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
)
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
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
5
));
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
;
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
)
if
(
nagaSign
==
null
)
{
{
...
@@ -305,22 +336,22 @@ public class gameCard : OCGobject
...
@@ -305,22 +336,22 @@ public class gameCard : OCGobject
}
}
if
(
game_object_verticle_drawing
!=
null
&&
Program
.
getVerticalTransparency
()
>
0.5f
)
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
.
SetParent
(
game_object_verticle_drawing
.
transform
);
nagaSign
.
transform
.
localRotation
=
Quaternion
.
identity
;
nagaSign
.
transform
.
localRotation
=
Quaternion
.
identity
;
nagaSign
.
transform
.
localScale
=
Vector3
.
zero
;
nagaSign
.
transform
.
localScale
=
Vector3
.
zero
;
nagaSign
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
-
0.25f
);
nagaSign
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
-
0.25f
);
}
}
try
try
{
{
Vector3
devide
=
game_object_verticle_drawing
.
transform
.
localScale
;
Vector3
devide
=
game_object_verticle_drawing
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
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
));
nagaSign
.
transform
.
localScale
=
(
}
new
Vector3
(
2.4f
/
devide
.
x
,
2.4f
/
devide
.
y
,
2.4f
/
devide
.
z
)
catch
(
Exception
)
);
{
}
}
catch
(
Exception
)
{
}
}
}
else
else
{
{
...
@@ -335,21 +366,21 @@ public class gameCard : OCGobject
...
@@ -335,21 +366,21 @@ public class gameCard : OCGobject
{
{
Vector3
devide
=
gameObject_face
.
transform
.
localScale
;
Vector3
devide
=
gameObject_face
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
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
));
nagaSign
.
transform
.
localScale
=
(
}
new
Vector3
(
2.4f
/
devide
.
x
,
2.4f
/
devide
.
y
,
2.4f
/
devide
.
z
)
catch
(
Exception
)
);
{
}
}
catch
(
Exception
)
{
}
}
}
}
}
else
else
{
{
if
(
nagaSign
!=
null
)
if
(
nagaSign
!=
null
)
{
{
destroy
(
nagaSign
,
0.6f
,
true
,
true
);
destroy
(
nagaSign
,
0.6f
,
true
,
true
);
}
}
}
}
if
(
currentKuangPre
!=
currentKuang
)
if
(
currentKuangPre
!=
currentKuang
)
{
{
currentKuangPre
=
currentKuang
;
currentKuangPre
=
currentKuang
;
switch
(
currentKuang
)
switch
(
currentKuang
)
...
@@ -367,7 +398,6 @@ public class gameCard : OCGobject
...
@@ -367,7 +398,6 @@ public class gameCard : OCGobject
chainKuang
.
SetActive
(
false
);
chainKuang
.
SetActive
(
false
);
break
;
break
;
}
}
}
}
if
(
currentFlashPre
!=
currentFlash
)
if
(
currentFlashPre
!=
currentFlash
)
{
{
...
@@ -560,8 +590,11 @@ public class gameCard : OCGobject
...
@@ -560,8 +590,11 @@ public class gameCard : OCGobject
private
void
ES_excited_handler_close_up_handler
()
private
void
ES_excited_handler_close_up_handler
()
{
{
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
accurate_position
);
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
accurate_position
);
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
10
));
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
gameObject
.
transform
.
position
+=
(
worldposition
-
gameObject
.
transform
.
position
)
*
35f
*
Program
.
deltaTime
;
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
)
if
(
game_object_verticle_drawing
!=
null
)
{
{
card_verticle_drawing_handler
();
card_verticle_drawing_handler
();
...
@@ -570,7 +603,7 @@ public class gameCard : OCGobject
...
@@ -570,7 +603,7 @@ public class gameCard : OCGobject
private
void
ES_excited_handler_button_shower
()
private
void
ES_excited_handler_button_shower
()
{
{
if
(
opMonsterWithBackGroundCard
)
if
(
opMonsterWithBackGroundCard
)
{
{
Vector3
vector_of_begin
=
Vector3
.
zero
;
Vector3
vector_of_begin
=
Vector3
.
zero
;
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
Attack
)
>
0
)
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
Attack
)
>
0
)
...
@@ -584,23 +617,34 @@ public class gameCard : OCGobject
...
@@ -584,23 +617,34 @@ public class gameCard : OCGobject
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
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
;
return
;
}
}
if
(
condition
==
gameCardCondition
.
floating_clickable
)
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
);
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
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
;
return
;
}
}
if
(
condition
==
gameCardCondition
.
verticle_clickable
)
if
(
condition
==
gameCardCondition
.
verticle_clickable
)
{
{
if
(
VerticleCollider
==
null
)
if
(
VerticleCollider
==
null
)
{
{
...
@@ -616,7 +660,12 @@ public class gameCard : OCGobject
...
@@ -616,7 +660,12 @@ public class gameCard : OCGobject
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
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
else
...
@@ -624,11 +673,17 @@ public class gameCard : OCGobject
...
@@ -624,11 +673,17 @@ public class gameCard : OCGobject
float
h
=
loaded_verticalDrawingK
*
0.618f
;
float
h
=
loaded_verticalDrawingK
*
0.618f
;
Vector3
vector_of_begin
=
Vector3
.
zero
;
Vector3
vector_of_begin
=
Vector3
.
zero
;
float
l
=
(
0.5f
*
game_object_verticle_drawing
.
transform
.
localScale
.
y
*
(
h
-
0.5f
));
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
);
vector_of_begin
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
vector_of_begin
);
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
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
;
return
;
...
@@ -641,8 +696,10 @@ public class gameCard : OCGobject
...
@@ -641,8 +696,10 @@ public class gameCard : OCGobject
{
{
if
(
gameObject_event_card_bed
==
null
)
if
(
gameObject_event_card_bed
==
null
)
{
{
gameObject_event_card_bed
gameObject_event_card_bed
=
create
(
=
create
(
Program
.
I
().
mod_ocgcore_hidden_button
,
gameObject
.
transform
.
position
);
Program
.
I
().
mod_ocgcore_hidden_button
,
gameObject
.
transform
.
position
);
}
}
}
}
else
else
...
@@ -660,7 +717,8 @@ public class gameCard : OCGobject
...
@@ -660,7 +717,8 @@ public class gameCard : OCGobject
//Program.I().audio.Play();
//Program.I().audio.Play();
//deltaTimeCloseUp = 0;
//deltaTimeCloseUp = 0;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
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
)
if
(
condition
==
gameCardCondition
.
floating_clickable
)
{
{
flash_line_on
();
flash_line_on
();
...
@@ -679,24 +737,44 @@ public class gameCard : OCGobject
...
@@ -679,24 +737,44 @@ public class gameCard : OCGobject
float
pianyi
=
130f
;
float
pianyi
=
130f
;
if
(
Program
.
getVerticalTransparency
()
<
0.5f
)
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
].
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
)
public
void
ES_exit_excited
(
bool
move_to_original_place
)
{
{
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
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
();
flash_line_off
();
ES_excited_unsafe_should_not_be_changed_dont_touch_this
=
false
;
ES_excited_unsafe_should_not_be_changed_dont_touch_this
=
false
;
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
...
@@ -719,7 +797,7 @@ public class gameCard : OCGobject
...
@@ -719,7 +797,7 @@ public class gameCard : OCGobject
public
void
ES_safe_card_move_to_original_place
()
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
)
private
void
ES_safe_card_move
(
Hashtable
move_hash
,
Hashtable
rotate_hash
)
...
@@ -763,11 +841,14 @@ public class gameCard : OCGobject
...
@@ -763,11 +841,14 @@ public class gameCard : OCGobject
public
void
UA_flush_all_gived_witn_lock
(
bool
rush
)
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
;
float
time
=
0.25f
;
time
+=
Vector3
.
Distance
(
gived_position
,
gameObject
.
transform
.
position
)
*
0.05f
/
20f
;
time
+=
Vector3
.
Distance
(
gived_position
,
gameObject
.
transform
.
position
)
*
0.05f
/
20f
;
ES_lock
(
time
+
0.1f
);
ES_lock
(
time
+
0.1f
);
UA_reloadCardHintPosition
();
UA_reloadCardHintPosition
();
if
(
rush
)
if
(
rush
)
{
{
...
@@ -780,13 +861,10 @@ public class gameCard : OCGobject
...
@@ -780,13 +861,10 @@ public class gameCard : OCGobject
TweenTo
(
gived_position
,
gived_rotation
);
TweenTo
(
gived_position
,
gived_rotation
);
if
(
if
(
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Move
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Move
||
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Swap
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Swap
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
PosChange
||
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
FlipSummoning
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
PosChange
)
||
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
FlipSummoning
)
{
{
Program
.
I
().
ocgcore
.
Sleep
((
int
)(
30f
*
time
));
Program
.
I
().
ocgcore
.
Sleep
((
int
)(
30f
*
time
));
}
}
...
@@ -811,15 +889,26 @@ public class gameCard : OCGobject
...
@@ -811,15 +889,26 @@ public class gameCard : OCGobject
//time *= 20;
//time *= 20;
iTween
.
EaseType
e
=
iTween
.
EaseType
.
easeOutQuad
;
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
;
e
=
iTween
.
EaseType
.
easeInQuad
;
}
}
if
(
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
;
Vector3
from
=
gameObject
.
transform
.
position
;
...
@@ -827,97 +916,64 @@ public class gameCard : OCGobject
...
@@ -827,97 +916,64 @@ public class gameCard : OCGobject
Vector3
[]
path
=
new
Vector3
[
30
];
Vector3
[]
path
=
new
Vector3
[
30
];
for
(
int
i
=
0
;
i
<
30
;
i
++)
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
)
if
(
exciting
)
{
{
ES_safe_card_move
(
ES_safe_card_move
(
iTween
.
Hash
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"path"
,
path
,
"time"
,
time
),
"x"
,
pos
.
x
,
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
"y"
,
pos
.
y
,
);
"z"
,
pos
.
z
,
"path"
,
path
,
"time"
,
time
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
);
}
}
else
else
{
{
ES_safe_card_move
(
ES_safe_card_move
(
iTween
.
Hash
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"x"
,
"y"
,
pos
.
y
,
pos
.
x
,
"z"
,
pos
.
z
,
"y"
,
"path"
,
path
,
pos
.
y
,
"time"
,
time
,
"z"
,
"easetype"
,
e
pos
.
z
,
),
"path"
,
iTween
.
Hash
path
,
(
"time"
,
"x"
,
rot
.
x
,
time
,
"y"
,
rot
.
y
,
"easetype"
,
"z"
,
rot
.
z
,
e
"time"
,
time
,
),
"easetype"
,
e
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
,
"easetype"
,
e
)
)
);
);
}
}
}
}
else
else
{
{
if
(
exciting
)
if
(
exciting
)
{
{
ES_safe_card_move
(
ES_safe_card_move
(
iTween
.
Hash
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"time"
,
time
),
"x"
,
pos
.
x
,
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
"y"
,
pos
.
y
,
);
"z"
,
pos
.
z
,
"time"
,
time
),
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
)
);
}
}
else
else
{
{
ES_safe_card_move
(
ES_safe_card_move
(
iTween
.
Hash
(
iTween
.
Hash
(
"x"
,
pos
.
x
,
"y"
,
pos
.
y
,
"z"
,
pos
.
z
,
"time"
,
time
,
"easetype"
,
e
),
"x"
,
pos
.
x
,
iTween
.
Hash
(
"x"
,
rot
.
x
,
"y"
,
rot
.
y
,
"z"
,
rot
.
z
,
"time"
,
time
,
"easetype"
,
e
)
"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
()
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
)
if
(
p
.
controller
==
0
)
{
{
...
@@ -969,7 +1025,10 @@ public class gameCard : OCGobject
...
@@ -969,7 +1025,10 @@ public class gameCard : OCGobject
try
try
{
{
gameObject_event_main
.
GetComponent
<
MeshCollider
>().
enabled
=
true
;
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
)
catch
(
System
.
Exception
e
)
{
{
...
@@ -977,7 +1036,8 @@ public class gameCard : OCGobject
...
@@ -977,7 +1036,8 @@ public class gameCard : OCGobject
}
}
destroy
(
game_object_monster_cloude
);
destroy
(
game_object_monster_cloude
);
destroy
(
game_object_verticle_drawing
);
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
);
destroy
(
game_object_verticle_Star
);
refreshFunctions
.
Remove
(
this
.
card_verticle_drawing_handler
);
refreshFunctions
.
Remove
(
this
.
card_verticle_drawing_handler
);
refreshFunctions
.
Remove
(
this
.
monster_cloude_handler
);
refreshFunctions
.
Remove
(
this
.
monster_cloude_handler
);
...
@@ -991,7 +1051,10 @@ public class gameCard : OCGobject
...
@@ -991,7 +1051,10 @@ public class gameCard : OCGobject
try
try
{
{
gameObject_event_main
.
GetComponent
<
MeshCollider
>().
enabled
=
false
;
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
);
destroy
(
gameObject_event_card_bed
);
}
}
catch
(
System
.
Exception
e
)
catch
(
System
.
Exception
e
)
...
@@ -1000,7 +1063,8 @@ public class gameCard : OCGobject
...
@@ -1000,7 +1063,8 @@ public class gameCard : OCGobject
}
}
destroy
(
game_object_monster_cloude
);
destroy
(
game_object_monster_cloude
);
destroy
(
game_object_verticle_drawing
);
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
);
destroy
(
game_object_verticle_Star
);
refreshFunctions
.
Remove
(
this
.
card_verticle_drawing_handler
);
refreshFunctions
.
Remove
(
this
.
card_verticle_drawing_handler
);
refreshFunctions
.
Remove
(
this
.
monster_cloude_handler
);
refreshFunctions
.
Remove
(
this
.
monster_cloude_handler
);
...
@@ -1014,7 +1078,10 @@ public class gameCard : OCGobject
...
@@ -1014,7 +1078,10 @@ public class gameCard : OCGobject
try
try
{
{
gameObject_event_main
.
GetComponent
<
MeshCollider
>().
enabled
=
true
;
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
)
catch
(
System
.
Exception
e
)
{
{
...
@@ -1034,11 +1101,13 @@ public class gameCard : OCGobject
...
@@ -1034,11 +1101,13 @@ public class gameCard : OCGobject
}
}
}
}
}
}
int
loaded_controller
=
-
1
;
int
loaded_controller
=
-
1
;
int
loaded_location
=
-
1
;
int
loaded_location
=
-
1
;
private
void
card_floating_text_handler
()
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_controller
=
(
int
)
p
.
controller
;
loaded_location
=
(
int
)
p
.
location
;
loaded_location
=
(
int
)
p
.
location
;
...
@@ -1059,7 +1128,11 @@ public class gameCard : OCGobject
...
@@ -1059,7 +1128,11 @@ public class gameCard : OCGobject
{
{
loc
=
GameStringHelper
.
chuwai
;
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
;
loc
=
GameStringHelper
.
SemiNomi
;
}
}
...
@@ -1077,8 +1150,12 @@ public class gameCard : OCGobject
...
@@ -1077,8 +1150,12 @@ public class gameCard : OCGobject
{
{
if
(
game_object_monster_cloude
==
null
)
if
(
game_object_monster_cloude
==
null
)
{
{
game_object_monster_cloude
=
create
(
Program
.
I
().
mod_ocgcore_card_cloude
,
gameObject
.
transform
.
position
);
game_object_monster_cloude
=
create
(
game_object_monster_cloude_ParticleSystem
=
game_object_monster_cloude
.
GetComponent
<
ParticleSystem
>();
Program
.
I
().
mod_ocgcore_card_cloude
,
gameObject
.
transform
.
position
);
game_object_monster_cloude_ParticleSystem
=
game_object_monster_cloude
.
GetComponent
<
ParticleSystem
>();
}
}
}
}
else
else
...
@@ -1094,72 +1171,81 @@ public class gameCard : OCGobject
...
@@ -1094,72 +1171,81 @@ public class gameCard : OCGobject
{
{
if
(
game_object_monster_cloude_ParticleSystem
!=
null
)
if
(
game_object_monster_cloude_ParticleSystem
!=
null
)
{
{
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject
.
transform
.
position
);
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
game_object_monster_cloude
.
transform
.
position
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
+
3
));
gameObject
.
transform
.
position
game_object_monster_cloude_ParticleSystem
.
startSize
=
UnityEngine
.
Random
.
Range
(
3f
,
3f
+
(
20f
-
3f
)
*
(
float
)(
Mathf
.
Clamp
(
data
.
Attack
,
0
,
3000
))
/
3000f
);
);
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Earth
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
200f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
20
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
8
0f
/
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Water
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
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
),
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Fire
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
255
f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0
f
/
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Wind
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
14
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Dark
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
158f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
158
f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0
f
/
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Light
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
255
f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140
f
/
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
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Divine
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
255
f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140
f
/
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
;
int
loaded_verticalDrawingCode
=
-
1
;
bool
loaded_verticalDrawingReal
=
false
;
bool
loaded_verticalDrawingReal
=
false
;
float
loaded_verticalDrawingK
=
1
;
float
loaded_verticalDrawingK
=
1
;
// bool picLikeASquare = false;
// bool picLikeASquare = false;
int
loaded_verticalDrawingNumber
=
-
1
;
int
loaded_verticalDrawingNumber
=
-
1
;
int
loaded_verticalatk
=
-
1
;
int
loaded_verticalatk
=
-
1
;
int
loaded_verticaldef
=
-
1
;
int
loaded_verticaldef
=
-
1
;
...
@@ -1169,22 +1255,37 @@ public class gameCard : OCGobject
...
@@ -1169,22 +1255,37 @@ public class gameCard : OCGobject
int
loaded_verticalOverAttribute
=
-
1
;
int
loaded_verticalOverAttribute
=
-
1
;
float
k_verticle
=
1
;
float
k_verticle
=
1
;
float
VerticleTransparency
=
1f
;
float
VerticleTransparency
=
1f
;
public
bool
opMonsterWithBackGroundCard
=
false
;
public
bool
opMonsterWithBackGroundCard
=
false
;
void
card_verticle_drawing_handler
()
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
)
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
)
if
(
texture
!=
null
)
{
{
loaded_verticalDrawingCode
=
data
.
Id
;
loaded_verticalDrawingCode
=
data
.
Id
;
loaded_verticalDrawingK
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_verticle_drawing
);
loaded_verticalDrawingK
=
GameTextureManager
.
getK
(
// picLikeASquare = GameTextureManager.getB(data.Id, GameTextureType.card_verticle_drawing);
data
.
Id
,
GameTextureType
.
card_verticle_drawing
);
// picLikeASquare = GameTextureManager.getB(data.Id, GameTextureType.card_verticle_drawing);
if
(
game_object_verticle_drawing
==
null
)
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
;
VerticleTransparency
=
1f
;
}
}
if
(
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
if
(
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
...
@@ -1192,7 +1293,8 @@ public class gameCard : OCGobject
...
@@ -1192,7 +1293,8 @@ public class gameCard : OCGobject
loaded_verticalDrawingReal
=
Program
.
getVerticalTransparency
()
>
0.5f
;
loaded_verticalDrawingReal
=
Program
.
getVerticalTransparency
()
>
0.5f
;
game_object_verticle_drawing
.
transform
.
localScale
=
Vector3
.
zero
;
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
;
k_verticle
=
(
float
)
texture
.
width
/
(
float
)
texture
.
height
;
}
}
}
}
...
@@ -1201,10 +1303,14 @@ public class gameCard : OCGobject
...
@@ -1201,10 +1303,14 @@ public class gameCard : OCGobject
Texture2D
texture
=
GameTextureManager
.
N
;
Texture2D
texture
=
GameTextureManager
.
N
;
loaded_verticalDrawingCode
=
data
.
Id
;
loaded_verticalDrawingCode
=
data
.
Id
;
loaded_verticalDrawingK
=
1
;
loaded_verticalDrawingK
=
1
;
// picLikeASquare = true;
// picLikeASquare = true;
if
(
game_object_verticle_drawing
==
null
)
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
;
VerticleTransparency
=
1f
;
}
}
if
(
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
if
(
loaded_verticalDrawingReal
!=
Program
.
getVerticalTransparency
()
>
0.5f
)
...
@@ -1212,14 +1318,15 @@ public class gameCard : OCGobject
...
@@ -1212,14 +1318,15 @@ public class gameCard : OCGobject
loaded_verticalDrawingReal
=
Program
.
getVerticalTransparency
()
>
0.5f
;
loaded_verticalDrawingReal
=
Program
.
getVerticalTransparency
()
>
0.5f
;
game_object_verticle_drawing
.
transform
.
localScale
=
Vector3
.
zero
;
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
;
k_verticle
=
(
float
)
texture
.
width
/
(
float
)
texture
.
height
;
}
}
}
}
else
else
{
{
float
trans
=
1f
;
float
trans
=
1f
;
//if (opMonsterWithBackGroundCard && loaded_verticalDrawingK < 0.9f && ability / loaded_verticalDrawingK > 2600f / 0.9f)
//if (opMonsterWithBackGroundCard && loaded_verticalDrawingK < 0.9f && ability / loaded_verticalDrawingK > 2600f / 0.9f)
//{
//{
// trans = 0.5f;
// trans = 0.5f;
//}
//}
...
@@ -1236,12 +1343,17 @@ public class gameCard : OCGobject
...
@@ -1236,12 +1343,17 @@ public class gameCard : OCGobject
{
{
trans
=
1
;
trans
=
1
;
}
}
if
(
trans
!=
VerticleTransparency
)
if
(
trans
!=
VerticleTransparency
)
{
{
VerticleTransparency
=
trans
;
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
)
if
(
VerticleCollider
!=
null
)
{
{
...
@@ -1258,11 +1370,17 @@ public class gameCard : OCGobject
...
@@ -1258,11 +1370,17 @@ public class gameCard : OCGobject
}
}
Vector3
want_scale
=
Vector3
.
zero
;
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
);
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
.
position
=
get_verticle_drawing_vector
(
game_object_verticle_drawing
.
transform
.
localScale
+=
(
want_scale
-
game_object_verticle_drawing
.
transform
.
localScale
)
*
Program
.
deltaTime
*
10f
;
gameObject_face
.
transform
.
position
);
game_object_verticle_drawing
.
transform
.
localScale
+=
(
want_scale
-
game_object_verticle_drawing
.
transform
.
localScale
)
*
Program
.
deltaTime
*
10f
;
if
(
VerticleCollider
!=
null
)
if
(
VerticleCollider
!=
null
)
{
{
...
@@ -1271,7 +1389,6 @@ public class gameCard : OCGobject
...
@@ -1271,7 +1389,6 @@ public class gameCard : OCGobject
VerticleCollider
.
center
=
new
Vector3
(
0
,
-
0.5f
+
0.5f
*
h
,
0
);
VerticleCollider
.
center
=
new
Vector3
(
0
,
-
0.5f
+
0.5f
*
h
,
0
);
}
}
int
color
=
0
;
int
color
=
0
;
if
((
data
.
Type
&
(
int
)
CardType
.
Tuner
)
>
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
Tuner
)
>
0
)
...
@@ -1296,76 +1413,125 @@ public class gameCard : OCGobject
...
@@ -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_verticalDrawingNumber
=
(
int
)
data
.
Level
;
loaded_verticalColor
=
color
;
loaded_verticalColor
=
color
;
if
(
verticle_number
==
null
)
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
)
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
)
if
(
color
==
0
)
{
{
verticle_number
.
text
=
data
.
Level
.
ToString
();
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
)
if
(
color
==
1
)
{
{
verticle_number
.
text
=
"<#FFFF00>"
+
data
.
Level
.
ToString
()
+
"</color>"
;
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
)
if
(
color
==
2
)
{
{
verticle_number
.
text
=
"<#999999>"
+
data
.
Level
.
ToString
()
+
"</color>"
;
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
)
if
(
color
==
3
)
{
{
verticle_number
.
text
=
"<#E1FFFF>"
+
data
.
Level
.
ToString
()
+
"</color>"
;
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
)
if
(
Program
.
getVerticalTransparency
()
<
0.5f
)
{
{
Vector3
screen_number_pos
;
Vector3
screen_number_pos
;
screen_number_pos
=
2
*
gameObject_face
.
transform
.
position
-
cardHint
.
gameObject
.
transform
.
position
;
screen_number_pos
=
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
screen_number_pos
+
new
Vector3
(-
0.25f
,
0
,
-
0.7f
));
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
;
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
)
if
(
game_object_verticle_Star
!=
null
)
{
{
screen_number_pos
=
2
*
gameObject_face
.
transform
.
position
-
cardHint
.
gameObject
.
transform
.
position
;
screen_number_pos
=
screen_number_pos
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
screen_number_pos
+
new
Vector3
(-
1.5f
,
0
,
-
0.7f
));
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
;
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
else
{
{
Vector3
screen_number_pos
;
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
;
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
)
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
;
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_verticalatk
=
data
.
Attack
;
loaded_verticaldef
=
data
.
Defense
;
loaded_verticaldef
=
data
.
Defense
;
loaded_verticalpos
=
p
.
position
;
loaded_verticalpos
=
p
.
position
;
loaded_verticalcon
=
(
int
)
p
.
controller
;
loaded_verticalcon
=
(
int
)
p
.
controller
;
if
((
data
.
Type
&(
uint
)
CardType
.
Link
)>
0
)
if
((
data
.
Type
&
(
uint
)
CardType
.
Link
)
>
0
)
{
{
string
raw
=
""
;
string
raw
=
""
;
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
...
@@ -1381,9 +1547,16 @@ public class gameCard : OCGobject
...
@@ -1381,9 +1547,16 @@ public class gameCard : OCGobject
{
{
raw
+=
data
.
Attack
.
ToString
();
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"
,
"?"
));
set_text
(
raw
.
Replace
(
"-2"
,
"?"
));
}
}
...
@@ -1409,7 +1582,14 @@ public class gameCard : OCGobject
...
@@ -1409,7 +1582,14 @@ public class gameCard : OCGobject
raw
+=
"<#888888>"
+
data
.
Defense
.
ToString
()
+
"</color>"
;
raw
+=
"<#888888>"
+
data
.
Defense
.
ToString
()
+
"</color>"
;
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"
,
"?"
));
set_text
(
raw
.
Replace
(
"-2"
,
"?"
));
}
}
...
@@ -1431,13 +1611,18 @@ public class gameCard : OCGobject
...
@@ -1431,13 +1611,18 @@ public class gameCard : OCGobject
}
}
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"
,
"?"
));
set_text
(
raw
.
Replace
(
"-2"
,
"?"
));
}
}
}
}
}
}
}
}
}
}
...
@@ -1497,7 +1682,7 @@ public class gameCard : OCGobject
...
@@ -1497,7 +1682,7 @@ public class gameCard : OCGobject
public
void
set_code
(
int
code
)
public
void
set_code
(
int
code
)
{
{
if
(
code
>
0
)
if
(
code
>
0
)
{
{
if
(
data
.
Id
!=
code
)
if
(
data
.
Id
!=
code
)
{
{
...
@@ -1505,9 +1690,9 @@ public class gameCard : OCGobject
...
@@ -1505,9 +1690,9 @@ public class gameCard : OCGobject
data
.
Id
=
code
;
data
.
Id
=
code
;
if
(
p
.
controller
==
1
)
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
))
if
(!
Program
.
I
().
ocgcore
.
sideReference
.
ContainsKey
(
code
))
{
{
Program
.
I
().
ocgcore
.
sideReference
.
Add
(
code
,
code
);
Program
.
I
().
ocgcore
.
sideReference
.
Add
(
code
,
code
);
}
}
...
@@ -1524,7 +1709,7 @@ public class gameCard : OCGobject
...
@@ -1524,7 +1709,7 @@ public class gameCard : OCGobject
clear_all_tail
();
clear_all_tail
();
}
}
public
void
erase_data
()
public
void
erase_data
()
{
{
set_data
(
YGOSharp
.
CardsManager
.
Get
(
0
));
set_data
(
YGOSharp
.
CardsManager
.
Get
(
0
));
disabled
=
false
;
disabled
=
false
;
...
@@ -1537,7 +1722,7 @@ public class gameCard : OCGobject
...
@@ -1537,7 +1722,7 @@ public class gameCard : OCGobject
}
}
int
loaded_cardPictureCode
=
-
1
;
int
loaded_cardPictureCode
=
-
1
;
int
loaded_cardCode
=
-
1
;
int
loaded_cardCode
=
-
1
;
int
loaded_back
=
-
1
;
int
loaded_back
=
-
1
;
int
loaded_specialHint
=
-
1
;
int
loaded_specialHint
=
-
1
;
bool
cardCodeChangedButNowLoadedPic
=
false
;
bool
cardCodeChangedButNowLoadedPic
=
false
;
...
@@ -1551,7 +1736,11 @@ public class gameCard : OCGobject
...
@@ -1551,7 +1736,11 @@ public class gameCard : OCGobject
}
}
if
(
loaded_cardPictureCode
!=
data
.
Id
)
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
)
if
(
texture
!=
null
)
{
{
loaded_cardPictureCode
=
data
.
Id
;
loaded_cardPictureCode
=
data
.
Id
;
...
@@ -1559,9 +1748,10 @@ public class gameCard : OCGobject
...
@@ -1559,9 +1748,10 @@ public class gameCard : OCGobject
}
}
else
else
{
{
if
(
cardCodeChangedButNowLoadedPic
)
if
(
cardCodeChangedButNowLoadedPic
)
{
{
gameObject_face
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
unknown
;
gameObject_face
.
GetComponent
<
Renderer
>().
material
.
mainTexture
=
GameTextureManager
.
unknown
;
cardCodeChangedButNowLoadedPic
=
false
;
cardCodeChangedButNowLoadedPic
=
false
;
}
}
}
}
...
@@ -1571,10 +1761,18 @@ public class gameCard : OCGobject
...
@@ -1571,10 +1761,18 @@ public class gameCard : OCGobject
try
try
{
{
loaded_back
=
(
int
)
p
.
controller
;
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
)
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
);
del_one_tail
(
GameStringHelper
.
opHint
);
if
(
loaded_back
!=
controllerBased
)
if
(
loaded_back
!=
controllerBased
)
...
@@ -1602,10 +1800,10 @@ public class gameCard : OCGobject
...
@@ -1602,10 +1800,10 @@ public class gameCard : OCGobject
special_hint
=
2
;
special_hint
=
2
;
}
}
}
}
if
(
loaded_specialHint
!=
special_hint
)
if
(
loaded_specialHint
!=
special_hint
)
{
{
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
.
licechuwai
);
del_one_tail
(
GameStringHelper
.
biaoceewai
);
del_one_tail
(
GameStringHelper
.
biaoceewai
);
...
@@ -1626,7 +1824,7 @@ public class gameCard : OCGobject
...
@@ -1626,7 +1824,7 @@ public class gameCard : OCGobject
public
void
add_string_tail
(
string
str
)
public
void
add_string_tail
(
string
str
)
{
{
tails
.
Add
(
str
);
tails
.
Add
(
str
);
if
(
Program
.
I
().
cardDescription
.
ifShowingThisCard
(
data
))
if
(
Program
.
I
().
cardDescription
.
ifShowingThisCard
(
data
))
{
{
showMeLeft
();
showMeLeft
();
}
}
...
@@ -1721,28 +1919,29 @@ public class gameCard : OCGobject
...
@@ -1721,28 +1919,29 @@ public class gameCard : OCGobject
Vector3
get_verticle_drawing_vector
(
Vector3
facevector
)
Vector3
get_verticle_drawing_vector
(
Vector3
facevector
)
{
{
Vector3
want_position
=
Vector3
.
zero
;
Vector3
want_position
=
Vector3
.
zero
;
if
(
isMinBlockMode
)
if
(
isMinBlockMode
)
{
{
want_position
=
facevector
;
want_position
=
facevector
;
want_position
.
y
+=
(
4.2f
/
loaded_verticalDrawingK
)
/
2f
*
0.5f
;
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
else
{
{
float
showscale
=
Program
.
verticleScale
;
float
showscale
=
Program
.
verticleScale
;
want_position
=
facevector
;
want_position
=
facevector
;
want_position
.
y
+=
(
showscale
/
loaded_verticalDrawingK
)
/
2f
*
0.5f
;
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
;
return
want_position
;
}
}
#
endregion
#
endregion
#
region
publicTools
#
region
publicTools
public
void
show_number
(
int
number
,
bool
add
=
false
)
public
void
show_number
(
int
number
,
bool
add
=
false
)
{
{
if
(
add
)
if
(
add
)
{
{
...
@@ -1787,7 +1986,7 @@ public class gameCard : OCGobject
...
@@ -1787,7 +1986,7 @@ public class gameCard : OCGobject
List
<
gameButton
>
buttons
=
new
List
<
gameButton
>();
List
<
gameButton
>
buttons
=
new
List
<
gameButton
>();
public
void
add_one_button
(
gameButton
b
)
public
void
add_one_button
(
gameButton
b
)
{
{
b
.
cookieCard
=
this
;
b
.
cookieCard
=
this
;
buttons
.
Add
(
b
);
buttons
.
Add
(
b
);
...
@@ -1806,7 +2005,7 @@ public class gameCard : OCGobject
...
@@ -1806,7 +2005,7 @@ public class gameCard : OCGobject
}
}
public
void
remove_all_cookie_button
()
public
void
remove_all_cookie_button
()
{
{
List
<
gameButton
>
buttons_to_remove
=
new
List
<
gameButton
>();
List
<
gameButton
>
buttons_to_remove
=
new
List
<
gameButton
>();
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
{
{
...
@@ -1823,7 +2022,7 @@ public class gameCard : OCGobject
...
@@ -1823,7 +2022,7 @@ public class gameCard : OCGobject
buttons_to_remove
.
Clear
();
buttons_to_remove
.
Clear
();
}
}
public
void
remove_all_unCookie_button
()
public
void
remove_all_unCookie_button
()
{
{
List
<
gameButton
>
buttons_to_remove
=
new
List
<
gameButton
>();
List
<
gameButton
>
buttons_to_remove
=
new
List
<
gameButton
>();
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
...
@@ -1858,7 +2057,14 @@ public class gameCard : OCGobject
...
@@ -1858,7 +2057,14 @@ public class gameCard : OCGobject
List
<
cardDecoration
>
cardDecorations
=
new
List
<
cardDecoration
>();
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
();
cardDecoration
c
=
new
cardDecoration
();
c
.
desctiption
=
desctiption
;
c
.
desctiption
=
desctiption
;
...
@@ -1875,22 +2081,42 @@ public class gameCard : OCGobject
...
@@ -1875,22 +2081,42 @@ public class gameCard : OCGobject
public
void
fast_decoration
(
GameObject
mod
)
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
)
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
)
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
)
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
)
public
void
del_all_decoration_by_string
(
string
desctiption
)
...
@@ -1973,8 +2199,6 @@ public class gameCard : OCGobject
...
@@ -1973,8 +2199,6 @@ public class gameCard : OCGobject
}
}
}
}
public
void
set_overlay_light
(
int
number
)
public
void
set_overlay_light
(
int
number
)
{
{
if
(
number
!=
0
)
if
(
number
!=
0
)
...
@@ -2015,7 +2239,11 @@ public class gameCard : OCGobject
...
@@ -2015,7 +2239,11 @@ public class gameCard : OCGobject
{
{
if
(
re
==
null
)
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
.
cookieString
=
"see_overlay"
;
button
.
notCookie
=
true
;
button
.
notCookie
=
true
;
button
.
cookieCard
=
this
;
button
.
cookieCard
=
this
;
...
@@ -2049,8 +2277,8 @@ public class gameCard : OCGobject
...
@@ -2049,8 +2277,8 @@ public class gameCard : OCGobject
GameObject
ret
=
null
;
GameObject
ret
=
null
;
ret
=
Program
.
I
().
create
(
mod
);
ret
=
Program
.
I
().
create
(
mod
);
ret
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
ret
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
ret
.
transform
.
localScale
=
new
Vector3
(
0.1f
/
3f
,
0.1f
,
0.1f
/
4f
);
ret
.
transform
.
localScale
=
new
Vector3
(
0.1f
/
3f
,
0.1f
,
0.1f
/
4f
);
ret
.
transform
.
localEulerAngles
=
new
Vector3
(
90
,
0
,
0
);
ret
.
transform
.
localEulerAngles
=
new
Vector3
(
90
,
0
,
0
);
return
ret
;
return
ret
;
}
}
...
@@ -2058,7 +2286,10 @@ public class gameCard : OCGobject
...
@@ -2058,7 +2286,10 @@ public class gameCard : OCGobject
{
{
FlashingController
flash
=
null
;
FlashingController
flash
=
null
;
Program
.
camera_game_main
.
GetComponent
<
HighlightingEffect
>().
enabled
=
true
;
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
.
SetParent
(
gameObject_face
.
transform
,
false
);
flash
.
transform
.
localPosition
=
Vector3
.
zero
;
flash
.
transform
.
localPosition
=
Vector3
.
zero
;
Color
tcl
=
Color
.
yellow
;
Color
tcl
=
Color
.
yellow
;
...
@@ -2072,9 +2303,10 @@ public class gameCard : OCGobject
...
@@ -2072,9 +2303,10 @@ public class gameCard : OCGobject
public
void
flash_line_on
()
public
void
flash_line_on
()
{
{
Program
.
camera_game_main
.
GetComponent
<
HighlightingEffect
>().
enabled
=
true
;
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
.
SetParent
(
gameObject_face
.
transform
,
false
);
MouseFlash
.
transform
.
localPosition
=
Vector3
.
zero
;
MouseFlash
.
transform
.
localPosition
=
Vector3
.
zero
;
Color
tcl
=
Color
.
yellow
;
Color
tcl
=
Color
.
yellow
;
...
@@ -2099,7 +2331,8 @@ public class gameCard : OCGobject
...
@@ -2099,7 +2331,8 @@ public class gameCard : OCGobject
public
void
p_line_on
()
public
void
p_line_on
()
{
{
Program
.
camera_game_main
.
GetComponent
<
HighlightingEffect
>().
enabled
=
true
;
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
=
create
(
Program
.
I
().
mod_ocgcore_card_figure_line
);
p_line
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
p_line
.
transform
.
SetParent
(
gameObject_face
.
transform
,
false
);
p_line
.
transform
.
localPosition
=
Vector3
.
zero
;
p_line
.
transform
.
localPosition
=
Vector3
.
zero
;
...
@@ -2121,47 +2354,80 @@ public class gameCard : OCGobject
...
@@ -2121,47 +2354,80 @@ public class gameCard : OCGobject
#
region
animation
#
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
);
ES_lock
(
time_move
+
time_move
+
time_still
);
confirm_step_time_still
=
time_still
;
confirm_step_time_still
=
time_still
;
confirm_step_time_move
=
time_move
;
confirm_step_time_move
=
time_move
;
confirm_step_r
=
rotation
;
confirm_step_r
=
rotation
;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
"x"
,
position
.
x
,
iTween
.
MoveTo
(
"y"
,
position
.
y
,
gameObject
,
"z"
,
position
.
z
,
iTween
.
Hash
(
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"x"
,
"oncomplete"
,
(
Action
)
confirm_step_2
,
position
.
x
,
"time"
,
confirm_step_time_move
"y"
,
));
position
.
y
,
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"z"
,
"x"
,
confirm_step_r
.
x
,
position
.
z
,
"y"
,
confirm_step_r
.
y
,
"onupdate"
,
"z"
,
confirm_step_r
.
z
,
(
Action
)
RefreshFunction_decoration
,
"time"
,
confirm_step_time_move
"oncomplete"
,
));
(
Action
)
confirm_step_2
,
}
"time"
,
confirm_step_time_move
public
void
animation_confirm_screenCenter
(
Vector3
rotation
,
float
time_move
,
float
time_still
)
)
);
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
)
{
{
ES_lock
(
time_move
+
time_move
+
time_still
);
ES_lock
(
time_move
+
time_move
+
time_still
);
confirm_step_time_still
=
time_still
;
confirm_step_time_still
=
time_still
;
confirm_step_time_move
=
time_move
;
confirm_step_time_move
=
time_move
;
confirm_step_r
=
rotation
;
confirm_step_r
=
rotation
;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
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
++)
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
"x"
,
confirm_step_r
.
x
,
iTween
.
RotateTo
(
"y"
,
confirm_step_r
.
y
,
gameObject
,
"z"
,
confirm_step_r
.
z
,
iTween
.
Hash
(
"easetype"
,
iTween
.
EaseType
.
spring
,
"x"
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
confirm_step_r
.
x
,
"oncomplete"
,
(
Action
)
confirm_step_2
,
"y"
,
"time"
,
confirm_step_time_move
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
>();
var
ttt
=
gameObject
.
AddComponent
<
screenFader
>();
ttt
.
from
=
gameObject
.
transform
.
position
;
ttt
.
from
=
gameObject
.
transform
.
position
;
ttt
.
time
=
time_move
;
ttt
.
time
=
time_move
;
...
@@ -2177,32 +2443,57 @@ public class gameCard : OCGobject
...
@@ -2177,32 +2443,57 @@ public class gameCard : OCGobject
void
confirm_step_2
()
void
confirm_step_2
()
{
{
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
iTween
.
RotateTo
(
"x"
,
confirm_step_r
.
x
,
gameObject
,
"y"
,
confirm_step_r
.
y
,
iTween
.
Hash
(
"z"
,
confirm_step_r
.
z
,
"x"
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
confirm_step_r
.
x
,
"oncomplete"
,
(
Action
)
confirm_step_3
,
"y"
,
"time"
,
confirm_step_time_still
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
()
void
confirm_step_3
()
{
{
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
iTween
.
RotateTo
(
"x"
,
accurate_rotation
.
x
,
gameObject
,
"y"
,
accurate_rotation
.
y
,
iTween
.
Hash
(
"z"
,
accurate_rotation
.
z
,
"x"
,
"time"
,
confirm_step_time_move
accurate_rotation
.
x
,
));
"y"
,
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
accurate_rotation
.
y
,
"x"
,
accurate_position
.
x
,
"z"
,
"y"
,
accurate_position
.
y
,
accurate_rotation
.
z
,
"z"
,
accurate_position
.
z
,
"time"
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
confirm_step_time_move
"time"
,
confirm_step_time_move
,
)
"easetype"
,
iTween
.
EaseType
.
easeInQuad
);
));
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
)
public
void
animation_shake_to
(
float
time
)
...
@@ -2211,17 +2502,25 @@ public class gameCard : OCGobject
...
@@ -2211,17 +2502,25 @@ public class gameCard : OCGobject
gameObject
.
transform
.
position
=
accurate_position
;
gameObject
.
transform
.
position
=
accurate_position
;
gameObject
.
transform
.
eulerAngles
=
accurate_rotation
;
gameObject
.
transform
.
eulerAngles
=
accurate_rotation
;
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
iTween
.
ShakePosition
(
gameObject
,
iTween
.
Hash
(
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
"x"
,
1
,
iTween
.
ShakePosition
(
"y"
,
1
,
gameObject
,
"z"
,
1
,
iTween
.
Hash
(
"time"
,
time
,
"x"
,
"oncomplete"
,
(
Action
)
ES_safe_card_move_to_original_place
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
)
public
void
animation_rush_to
(
Vector3
position
,
Vector3
rotation
)
{
{
ES_lock
(
0.4f
);
ES_lock
(
0.4f
);
...
@@ -2229,25 +2528,32 @@ public class gameCard : OCGobject
...
@@ -2229,25 +2528,32 @@ public class gameCard : OCGobject
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
MonoBehaviour
.
Destroy
(
iTweens
[
i
]);
MonoBehaviour
.
DestroyImmediate
(
gameObject
.
GetComponent
<
screenFader
>());
MonoBehaviour
.
DestroyImmediate
(
gameObject
.
GetComponent
<
screenFader
>());
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
iTween
.
MoveTo
(
"x"
,
position
.
x
,
gameObject
,
"y"
,
position
.
y
,
iTween
.
Hash
(
"x"
,
position
.
x
,
"y"
,
position
.
y
,
"z"
,
position
.
z
,
"time"
,
0.2f
)
"z"
,
position
.
z
,
);
"time"
,
0.2f
iTween
.
RotateTo
(
));
gameObject
,
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
iTween
.
Hash
(
"x"
,
rotation
.
x
,
"x"
,
"y"
,
rotation
.
y
,
rotation
.
x
,
"z"
,
rotation
.
z
,
"y"
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
rotation
.
y
,
"oncomplete"
,
(
Action
)
ES_safe_card_move_to_original_place
,
"z"
,
"time"
,
0.21f
rotation
.
z
,
));
"onupdate"
,
}
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
public
void
animation_show_off
(
bool
summon
,
bool
disabled
=
false
)
(
Action
)
ES_safe_card_move_to_original_place
,
{
"time"
,
if
(
Ocgcore
.
inSkiping
)
0.21f
)
);
}
public
void
animation_show_off
(
bool
summon
,
bool
disabled
=
false
)
{
if
(
Ocgcore
.
inSkiping
)
{
{
return
;
return
;
}
}
...
@@ -2263,7 +2569,11 @@ public class gameCard : OCGobject
...
@@ -2263,7 +2569,11 @@ public class gameCard : OCGobject
}
}
else
if
(
show_off_shokewave
)
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
);
refreshFunctions
.
Add
(
SOH_nSum
);
Program
.
I
().
ocgcore
.
Sleep
(
30
);
Program
.
I
().
ocgcore
.
Sleep
(
30
);
...
@@ -2276,7 +2586,10 @@ public class gameCard : OCGobject
...
@@ -2276,7 +2586,10 @@ public class gameCard : OCGobject
}
}
else
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
);
refreshFunctions
.
Add
(
SOH_nAct
);
Program
.
I
().
ocgcore
.
Sleep
(
42
);
Program
.
I
().
ocgcore
.
Sleep
(
42
);
...
@@ -2305,11 +2618,21 @@ public class gameCard : OCGobject
...
@@ -2305,11 +2618,21 @@ public class gameCard : OCGobject
{
{
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
refreshFunctions
.
Remove
(
SOH_act
);
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
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
(
int
)(
500f
/
k
);
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
;
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
}
}
...
@@ -2322,12 +2645,24 @@ public class gameCard : OCGobject
...
@@ -2322,12 +2645,24 @@ public class gameCard : OCGobject
if
(
tex
!=
null
)
if
(
tex
!=
null
)
{
{
refreshFunctions
.
Remove
(
SOH_nAct
);
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
.
card
.
mainTexture
=
tex
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
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
();
shower
.
run
();
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
...
@@ -2344,11 +2679,21 @@ public class gameCard : OCGobject
...
@@ -2344,11 +2679,21 @@ public class gameCard : OCGobject
{
{
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
float
k
=
GameTextureManager
.
getK
(
data
.
Id
,
GameTextureType
.
card_feature
);
refreshFunctions
.
Remove
(
SOH_sum
);
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
.
card
.
mainTexture
=
tex
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
mainTexture
=
texc
;
shower
.
closeup
.
height
=
(
int
)(
500f
/
k
);
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
;
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
2f
,
false
,
true
);
destroy
(
shower
.
gameObject
,
2f
,
false
,
true
);
}
}
...
@@ -2361,34 +2706,57 @@ public class gameCard : OCGobject
...
@@ -2361,34 +2706,57 @@ public class gameCard : OCGobject
if
(
tex
!=
null
)
if
(
tex
!=
null
)
{
{
refreshFunctions
.
Remove
(
SOH_nSum
);
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
.
card
.
mainTexture
=
tex
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
iTween
.
ScaleTo
(
shower
.
gameObject
,
iTween
.
Hash
(
iTween
.
ScaleTo
(
"scale"
,
shower
.
gameObject
,
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
),
iTween
.
Hash
(
"time"
,
"scale"
,
0.5f
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
),
));
"time"
,
0.5f
)
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.5f
,
false
,
true
);
destroy
(
shower
.
gameObject
,
0.5f
,
false
,
true
);
}
}
}
}
private
void
SOH_dis
()
private
void
SOH_dis
()
{
{
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
Texture2D
tex
=
GameTextureManager
.
get
(
data
.
Id
,
GameTextureType
.
card_picture
);
if
(
tex
!=
null
)
if
(
tex
!=
null
)
{
{
refreshFunctions
.
Remove
(
SOH_dis
);
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
.
card
.
mainTexture
=
tex
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
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
();
shower
.
Dis
();
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
destroy
(
shower
.
gameObject
,
0.7f
,
false
,
true
);
...
@@ -2397,10 +2765,12 @@ public class gameCard : OCGobject
...
@@ -2397,10 +2765,12 @@ public class gameCard : OCGobject
public
void
sortButtons
()
public
void
sortButtons
()
{
{
buttons
.
Sort
((
left
,
right
)
=>
buttons
.
Sort
(
{
(
left
,
right
)
=>
return
getButtonGravity
(
right
)
-
getButtonGravity
(
left
);
{
});
return
getButtonGravity
(
right
)
-
getButtonGravity
(
left
);
}
);
}
}
int
getButtonGravity
(
gameButton
left
)
int
getButtonGravity
(
gameButton
left
)
...
@@ -2441,19 +2811,19 @@ public class gameCard : OCGobject
...
@@ -2441,19 +2811,19 @@ public class gameCard : OCGobject
public
void
ChainUNlock
()
public
void
ChainUNlock
()
{
{
for
(
int
i
=
0
;
i
<
chains
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
chains
.
Count
;
i
++)
{
{
if
(
chains
[
i
].
G
!=
null
)
if
(
chains
[
i
].
G
!=
null
)
{
{
Program
.
I
().
ocgcore
.
allChainPanelFixedContainer
.
Remove
(
chains
[
i
].
G
.
gameObject
);
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
);
}
}
}
}
}
}
void
handlerChain
()
void
handlerChain
()
{
{
for
(
int
i
=
0
;
i
<
chains
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
chains
.
Count
;
i
++)
{
{
if
(
chains
[
i
].
G
==
null
)
if
(
chains
[
i
].
G
==
null
)
{
{
...
@@ -2483,12 +2853,12 @@ public class gameCard : OCGobject
...
@@ -2483,12 +2853,12 @@ public class gameCard : OCGobject
Vector3
devide
=
game_object_verticle_drawing
.
transform
.
localScale
;
Vector3
devide
=
game_object_verticle_drawing
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
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
else
{
{
...
@@ -2511,12 +2881,12 @@ public class gameCard : OCGobject
...
@@ -2511,12 +2881,12 @@ public class gameCard : OCGobject
Vector3
devide
=
gameObject_face
.
transform
.
localScale
;
Vector3
devide
=
gameObject_face
.
transform
.
localScale
;
if
(
Vector3
.
Distance
(
Vector3
.
zero
,
devide
)
>
0.01f
)
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
else
{
{
...
@@ -2524,28 +2894,49 @@ public class gameCard : OCGobject
...
@@ -2524,28 +2894,49 @@ public class gameCard : OCGobject
}
}
}
}
}
}
if
(
CS_ballIsShowed
)
if
(
CS_ballIsShowed
)
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vchain
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vchain
.
value
==
true
)
{
{
if
(
ballChain
==
null
)
if
(
ballChain
==
null
)
{
{
ballChain
=
add_one_decoration
(
Program
.
I
().
mod_ocgcore_cs_chaining
,
3
,
Vector3
.
zero
,
"chaining"
,
false
).
game_object
;
ballChain
=
add_one_decoration
(
ballChain
.
GetComponent
<
slowFade
>().
yse
=
(
condition
!=
gameCardCondition
.
verticle_clickable
||
Program
.
getVerticalTransparency
()
<
0.5f
);
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
else
{
{
if
(
ballChain
!=
null
)
if
(
ballChain
!=
null
)
{
{
del_all_decoration_by_string
(
"chaining"
);
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
)
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
)
if
(
ballChain
!=
null
)
{
{
destroy
(
ballChain
);
destroy
(
ballChain
);
}
}
...
@@ -2564,12 +2955,12 @@ public class gameCard : OCGobject
...
@@ -2564,12 +2955,12 @@ public class gameCard : OCGobject
currentKuang
=
kuangType
.
chaining
;
currentKuang
=
kuangType
.
chaining
;
}
}
public
void
CS_hideBall
()
public
void
CS_hideBall
()
{
{
CS_ballIsShowed
=
false
;
CS_ballIsShowed
=
false
;
}
}
public
void
CS_ballToNumber
()
public
void
CS_ballToNumber
()
{
{
if
(
CS_ballIsShowed
)
if
(
CS_ballIsShowed
)
{
{
...
@@ -2598,12 +2989,12 @@ public class gameCard : OCGobject
...
@@ -2598,12 +2989,12 @@ public class gameCard : OCGobject
chains
.
Add
(
w
);
chains
.
Add
(
w
);
}
}
public
void
CS_removeOneChainNumber
()
public
void
CS_removeOneChainNumber
()
{
{
if
(
chains
.
Count
>
0
)
if
(
chains
.
Count
>
0
)
{
{
chainMono
decorationChain
=
chains
[
chains
.
Count
-
1
].
G
;
chainMono
decorationChain
=
chains
[
chains
.
Count
-
1
].
G
;
if
(
decorationChain
!=
null
)
if
(
decorationChain
!=
null
)
{
{
if
(
Program
.
I
().
ocgcore
.
inTheWorld
())
if
(
Program
.
I
().
ocgcore
.
inTheWorld
())
{
{
...
@@ -2620,9 +3011,9 @@ public class gameCard : OCGobject
...
@@ -2620,9 +3011,9 @@ public class gameCard : OCGobject
}
}
}
}
public
void
CS_removeAllChainNumber
()
public
void
CS_removeAllChainNumber
()
{
{
while
(
chains
.
Count
>
0
)
while
(
chains
.
Count
>
0
)
{
{
CS_removeOneChainNumber
();
CS_removeOneChainNumber
();
}
}
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
645bee95
...
@@ -29,6 +29,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -29,6 +29,8 @@ public class Ocgcore : ServantWithCardDescription
bool
flagForCancleChain
=
false
;
bool
flagForCancleChain
=
false
;
private
List
<
gameCard
>
chainCards
=
new
List
<
gameCard
>();
public
float
getScreenCenter
()
public
float
getScreenCenter
()
{
{
return
((
float
)
Screen
.
width
+
Program
.
I
().
cardDescription
.
width
-
gameInfo
.
width
)
/
2f
;
return
((
float
)
Screen
.
width
+
Program
.
I
().
cardDescription
.
width
-
gameInfo
.
width
)
/
2f
;
...
@@ -1195,11 +1197,21 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1195,11 +1197,21 @@ public class Ocgcore : ServantWithCardDescription
r
.
ReadChar
();
r
.
ReadChar
();
int
count
=
r
.
ReadByte
();
int
count
=
r
.
ReadByte
();
int
spcount
=
r
.
ReadByte
();
int
spcount
=
r
.
ReadByte
();
int
forced
=
r
.
ReadByte
();
int
hint0
=
r
.
ReadInt32
();
int
hint0
=
r
.
ReadInt32
();
int
hint1
=
r
.
ReadInt32
();
int
hint1
=
r
.
ReadInt32
();
bool
ignore
=
false
;
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
();
var
condition
=
gameInfo
.
get_condition
();
if
(
condition
==
gameInfo
.
chainCondition
.
no
)
if
(
condition
==
gameInfo
.
chainCondition
.
no
)
...
@@ -2394,6 +2406,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2394,6 +2406,7 @@ public class Ocgcore : ServantWithCardDescription
break
;
break
;
case
GameMessage
.
ConfirmCards
:
case
GameMessage
.
ConfirmCards
:
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
bool
skip_panel
=
r
.
ReadByte
()
==
1
;
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
{
...
@@ -2957,7 +2970,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2957,7 +2970,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
}
}
void
practicalizeMessage
(
Package
p
)
private
void
practicalizeMessage
(
Package
p
)
{
{
int
player
=
0
;
int
player
=
0
;
int
count
=
0
;
int
count
=
0
;
...
@@ -3896,17 +3909,16 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -3896,17 +3909,16 @@ public class Ocgcore : ServantWithCardDescription
player
=
localPlayer
(
r
.
ReadChar
());
player
=
localPlayer
(
r
.
ReadChar
());
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
int
spcount
=
r
.
ReadByte
();
int
spcount
=
r
.
ReadByte
();
int
forced
=
r
.
ReadByte
();
int
hint0
=
r
.
ReadInt32
();
int
hint0
=
r
.
ReadInt32
();
int
hint1
=
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
++)
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
{
int
flag
=
0
;
var
flag
=
r
.
ReadChar
();
if
(
length_of_message
%
12
!=
0
)
var
forced
=
r
.
ReadByte
();
{
forceCount
+=
forced
;
flag
=
r
.
ReadChar
();
}
code
=
r
.
ReadInt32
()
%
1000000000
;
code
=
r
.
ReadInt32
()
%
1000000000
;
gps
=
r
.
ReadGPS
();
gps
=
r
.
ReadGPS
();
desc
=
GameStringManager
.
get
(
r
.
ReadInt32
());
desc
=
GameStringManager
.
get
(
r
.
ReadInt32
());
...
@@ -3920,12 +3932,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -3920,12 +3932,13 @@ public class Ocgcore : ServantWithCardDescription
eff
.
flag
=
flag
;
eff
.
flag
=
flag
;
eff
.
ptr
=
i
;
eff
.
ptr
=
i
;
eff
.
desc
=
desc
;
eff
.
desc
=
desc
;
eff
.
forced
=
forced
>
0
;
card
.
effects
.
Add
(
eff
);
card
.
effects
.
Add
(
eff
);
}
}
}
}
var
chain_condition
=
gameInfo
.
get_condition
();
var
chain_condition
=
gameInfo
.
get_condition
();
int
handle_flag
=
0
;
int
handle_flag
=
0
;
if
(
force
d
==
0
)
if
(
force
Count
==
0
)
{
{
//无强制发动的卡
//无强制发动的卡
if
(
spcount
==
0
)
if
(
spcount
==
0
)
...
@@ -4149,8 +4162,23 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4149,8 +4162,23 @@ public class Ocgcore : ServantWithCardDescription
if
(
handle_flag
==
4
)
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
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
(
Int32
)(
chainCards
[
0
].
effects
[
0
].
ptr
)
);
binaryMaster
.
writer
.
Write
(
answer
>=
0
?
answer
:
0
);
sendReturn
(
binaryMaster
.
get
());
sendReturn
(
binaryMaster
.
get
());
}
}
break
;
break
;
...
@@ -4376,6 +4404,12 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4376,6 +4404,12 @@ public class Ocgcore : ServantWithCardDescription
card
.
selectPtr
=
i
;
card
.
selectPtr
=
i
;
card
.
levelForSelect_1
=
para
&
0xffff
;
card
.
levelForSelect_1
=
para
&
0xffff
;
card
.
levelForSelect_2
=
para
>>
16
;
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
)
if
(
card
.
levelForSelect_2
==
0
)
{
{
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
...
@@ -4399,6 +4433,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4399,6 +4433,11 @@ public class Ocgcore : ServantWithCardDescription
card
.
selectPtr
=
i
;
card
.
selectPtr
=
i
;
card
.
levelForSelect_1
=
para
&
0xffff
;
card
.
levelForSelect_1
=
para
&
0xffff
;
card
.
levelForSelect_2
=
para
>>
16
;
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
)
if
(
card
.
levelForSelect_2
==
0
)
{
{
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
...
@@ -4688,6 +4727,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4688,6 +4727,7 @@ public class Ocgcore : ServantWithCardDescription
break
;
break
;
case
GameMessage
.
ConfirmCards
:
case
GameMessage
.
ConfirmCards
:
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
var
skip_panel
=
r
.
ReadByte
()
==
1
;
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
int
t2
=
0
;
int
t2
=
0
;
int
t3
=
0
;
int
t3
=
0
;
...
@@ -4783,6 +4823,12 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4783,6 +4823,12 @@ public class Ocgcore : ServantWithCardDescription
t2
=
0
;
t2
=
0
;
clearResponse
();
clearResponse
();
}
}
else
if
(
skip_panel
)
{
Sleep
(
t2
);
t2
=
0
;
clearResponse
();
}
}
}
Sleep
(
t2
);
Sleep
(
t2
);
break
;
break
;
...
@@ -9753,8 +9799,23 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -9753,8 +9799,23 @@ public class Ocgcore : ServantWithCardDescription
autoForceChainHandler
=
autoForceChainHandlerType
.
autoHandleAll
;
autoForceChainHandler
=
autoForceChainHandlerType
.
autoHandleAll
;
try
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
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
0
);
binaryMaster
.
writer
.
Write
(
answer
>=
0
?
answer
:
0
);
sendReturn
(
binaryMaster
.
get
());
sendReturn
(
binaryMaster
.
get
());
}
}
catch
(
System
.
Exception
e
)
catch
(
System
.
Exception
e
)
...
...
Assets/SibylSystem/Program.cs
View file @
645bee95
...
@@ -338,7 +338,7 @@ public class Program : MonoBehaviour
...
@@ -338,7 +338,7 @@ public class Program : MonoBehaviour
#elif UNITY_IPHONE //iPhone
#elif UNITY_IPHONE //iPhone
string
GamePaths
=
Application
.
persistentDataPath
+
"/ygopro2/"
;
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"
;
string
filePath
=
Application
.
streamingAssetsPath
+
"/ygopro2-data.zip"
;
ExtractZipFile
(
System
.
IO
.
File
.
ReadAllBytes
(
filePath
),
GamePaths
);
ExtractZipFile
(
System
.
IO
.
File
.
ReadAllBytes
(
filePath
),
GamePaths
);
...
@@ -1195,7 +1195,7 @@ public class Program : MonoBehaviour
...
@@ -1195,7 +1195,7 @@ public class Program : MonoBehaviour
FPS
=
FPS
.
Substring
(
0
,
5
);
FPS
=
FPS
.
Substring
(
0
,
5
);
}
}
catch
{
}
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
()
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 @@
...
@@ -13,11 +13,12 @@
Surrender
=
0x14
,
Surrender
=
0x14
,
TimeConfirm
=
0x15
,
TimeConfirm
=
0x15
,
Chat
=
0x16
,
Chat
=
0x16
,
ExternalAddress
=
0x17
,
HsToDuelist
=
0x20
,
HsToDuelist
=
0x20
,
HsToObserver
=
0x21
,
HsToObserver
=
0x21
,
HsReady
=
0x22
,
HsReady
=
0x22
,
HsNotReady
=
0x23
,
HsNotReady
=
0x23
,
HsKick
=
0x24
,
HsKick
=
0x24
,
HsStart
=
0x25
HsStart
=
0x25
,
}
}
}
}
Assets/transUI/prefab/trans_menu.prefab
View file @
645bee95
...
@@ -1417,7 +1417,7 @@ MonoBehaviour:
...
@@ -1417,7 +1417,7 @@ MonoBehaviour:
keepCrispWhenShrunk
:
1
keepCrispWhenShrunk
:
1
mTrueTypeFont
:
{
fileID
:
12800000
,
guid
:
f775853fdfd14bb47934543e95c3bae3
,
type
:
3
}
mTrueTypeFont
:
{
fileID
:
12800000
,
guid
:
f775853fdfd14bb47934543e95c3bae3
,
type
:
3
}
mFont
:
{
fileID
:
0
}
mFont
:
{
fileID
:
0
}
mText
:
KoishiPro2 iOS 1.036.
1-Otokaz
e
mText
:
KoishiPro2 iOS 1.036.
2-tcub
e
mFontSize
:
18
mFontSize
:
18
mFontStyle
:
0
mFontStyle
:
0
mAlignment
:
1
mAlignment
:
1
...
...
ProjectSettings/ProjectSettings.asset
View file @
645bee95
...
@@ -126,7 +126,7 @@ PlayerSettings:
...
@@ -126,7 +126,7 @@ PlayerSettings:
16:10:
1
16:10:
1
16:9:
1
16:9:
1
Others
:
1
Others
:
1
bundleVersion
:
1.036.
1-Otokaz
e
bundleVersion
:
1.036.
2-TCub
e
preloadedAssets
:
[]
preloadedAssets
:
[]
metroInputSource
:
0
metroInputSource
:
0
wsaTransparentSwapchain
:
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