Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro2
Commits
b1d1b754
Commit
b1d1b754
authored
Mar 24, 2019
by
無名の凝泪
Committed by
Unicorn369
Mar 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update OCG/TCG/Custom mark
parent
c7a2bd22
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
58 deletions
+102
-58
Assets/SibylSystem/ResourceManagers/GameStringHelper.cs
Assets/SibylSystem/ResourceManagers/GameStringHelper.cs
+5
-5
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+87
-47
Assets/YGOSharp/CardsManager.cs
Assets/YGOSharp/CardsManager.cs
+10
-6
No files found.
Assets/SibylSystem/ResourceManagers/GameStringHelper.cs
View file @
b1d1b754
...
@@ -123,16 +123,16 @@ public class GameStringHelper
...
@@ -123,16 +123,16 @@ public class GameStringHelper
switch
(
card
.
Ot
)
switch
(
card
.
Ot
)
{
{
case
1
:
case
1
:
limitot
=
"[OCG] "
;
limitot
=
GameStringManager
.
get_unsafe
(
1240
)
;
break
;
break
;
case
2
:
case
2
:
limitot
=
"[TCG] "
;
limitot
=
GameStringManager
.
get_unsafe
(
1241
)
;
break
;
break
;
case
3
:
case
3
:
limitot
=
"[OCG/TCG] "
;
limitot
=
GameStringManager
.
get_unsafe
(
1242
)
;
break
;
break
;
case
4
:
case
4
:
limitot
=
"[Anime] "
;
limitot
=
GameStringManager
.
get_unsafe
(
1243
)
;
break
;
break
;
}
}
string
re
=
""
;
string
re
=
""
;
...
@@ -140,7 +140,7 @@ public class GameStringHelper
...
@@ -140,7 +140,7 @@ public class GameStringHelper
{
{
re
+=
"[b]"
+
card
.
Name
+
"[/b]"
;
re
+=
"[b]"
+
card
.
Name
+
"[/b]"
;
re
+=
"\n"
;
re
+=
"\n"
;
re
+=
"[sup]
"
+
limitot
+
"
[/sup]"
;
re
+=
"[sup]
["
+
limitot
+
"]
[/sup]"
;
re
+=
"\r"
;
re
+=
"\r"
;
re
+=
"[sup]"
+
card
.
Id
.
ToString
()
+
"[/sup]"
;
re
+=
"[sup]"
+
card
.
Id
.
ToString
()
+
"[/sup]"
;
re
+=
"\n"
;
re
+=
"\n"
;
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
b1d1b754
...
@@ -21,7 +21,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -21,7 +21,7 @@ public class DeckManager : ServantWithCardDescription
UIPopupList
UIPopupList_main
;
UIPopupList
UIPopupList_main
;
UIPopupList
UIPopupList_ban
;
UIPopupList
UIPopupList_ban
;
UIPopupList
UIPopupList_second
;
UIPopupList
UIPopupList_second
;
...
@@ -81,7 +81,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -81,7 +81,7 @@ public class DeckManager : ServantWithCardDescription
UIInput_def
=
UIHelper
.
getByName
<
UIInput
>(
gameObjectDetailedSearch
,
"def_"
);
UIInput_def
=
UIHelper
.
getByName
<
UIInput
>(
gameObjectDetailedSearch
,
"def_"
);
for
(
int
i
=
0
;
i
<
32
;
i
++)
for
(
int
i
=
0
;
i
<
32
;
i
++)
{
{
UIToggle_effects
[
i
]
=
UIHelper
.
getByName
<
UIToggle
>(
gameObjectDetailedSearch
,
"T ("
+
(
i
+
1
).
ToString
()
+
")"
);
UIToggle_effects
[
i
]
=
UIHelper
.
getByName
<
UIToggle
>(
gameObjectDetailedSearch
,
"T ("
+
(
i
+
1
).
ToString
()
+
")"
);
UIHelper
.
trySetLableText
(
UIToggle_effects
[
i
].
gameObject
,
GameStringManager
.
get_unsafe
(
1100
+
i
));
UIHelper
.
trySetLableText
(
UIToggle_effects
[
i
].
gameObject
,
GameStringManager
.
get_unsafe
(
1100
+
i
));
UIToggle_effects
[
i
].
GetComponentInChildren
<
UILabel
>().
overflowMethod
=
UILabel
.
Overflow
.
ClampContent
;
UIToggle_effects
[
i
].
GetComponentInChildren
<
UILabel
>().
overflowMethod
=
UILabel
.
Overflow
.
ClampContent
;
}
}
...
@@ -101,6 +101,10 @@ public class DeckManager : ServantWithCardDescription
...
@@ -101,6 +101,10 @@ public class DeckManager : ServantWithCardDescription
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1316
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1316
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1317
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1317
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1318
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1318
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1240
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1241
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1242
));
UIPopupList_ban
.
AddItem
(
GameStringManager
.
get_unsafe
(
1243
));
clearAll
();
clearAll
();
UIHelper
.
registEvent
(
UIPopupList_main
.
gameObject
,
onUIPopupList_main
);
UIHelper
.
registEvent
(
UIPopupList_main
.
gameObject
,
onUIPopupList_main
);
UIHelper
.
registEvent
(
UIPopupList_second
.
gameObject
,
onUIPopupList_second
);
UIHelper
.
registEvent
(
UIPopupList_second
.
gameObject
,
onUIPopupList_second
);
...
@@ -111,7 +115,8 @@ public class DeckManager : ServantWithCardDescription
...
@@ -111,7 +115,8 @@ public class DeckManager : ServantWithCardDescription
itemOnListProducer
,
itemOnListProducer
,
86
86
);
);
Program
.
go
(
500
,
()
=>
{
Program
.
go
(
500
,
()
=>
{
List
<
MonoCardInDeckManager
>
cs
=
new
List
<
MonoCardInDeckManager
>();
List
<
MonoCardInDeckManager
>
cs
=
new
List
<
MonoCardInDeckManager
>();
for
(
int
i
=
0
;
i
<
300
;
i
++)
for
(
int
i
=
0
;
i
<
300
;
i
++)
{
{
...
@@ -212,14 +217,14 @@ public class DeckManager : ServantWithCardDescription
...
@@ -212,14 +217,14 @@ public class DeckManager : ServantWithCardDescription
RMSshow_input
(
"onRename"
,
InterString
.
Get
(
"新的卡组名"
),
newnamer
);
RMSshow_input
(
"onRename"
,
InterString
.
Get
(
"新的卡组名"
),
newnamer
);
}
}
public
override
void
ES_RMS
(
string
hashCode
,
List
<
messageSystemValue
>
result
)
public
override
void
ES_RMS
(
string
hashCode
,
List
<
messageSystemValue
>
result
)
{
{
base
.
ES_RMS
(
hashCode
,
result
);
base
.
ES_RMS
(
hashCode
,
result
);
if
(
hashCode
==
"onRename"
)
if
(
hashCode
==
"onRename"
)
{
{
string
raw
=
Config
.
Get
(
"deckInUse"
,
"miaowu"
);
string
raw
=
Config
.
Get
(
"deckInUse"
,
"miaowu"
);
Config
.
Set
(
"deckInUse"
,
result
[
0
].
value
);
Config
.
Set
(
"deckInUse"
,
result
[
0
].
value
);
if
(
onSave
())
if
(
onSave
())
{
{
((
CardDescription
)
Program
.
I
().
cardDescription
).
setTitle
(
result
[
0
].
value
);
((
CardDescription
)
Program
.
I
().
cardDescription
).
setTitle
(
result
[
0
].
value
);
}
}
...
@@ -232,7 +237,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -232,7 +237,7 @@ public class DeckManager : ServantWithCardDescription
public
Action
returnAction
=
null
;
public
Action
returnAction
=
null
;
public
bool
onSave
()
public
bool
onSave
()
{
{
try
try
{
{
...
@@ -334,7 +339,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -334,7 +339,7 @@ public class DeckManager : ServantWithCardDescription
void
clear
()
void
clear
()
{
{
var
deckTemp
=
deck
.
getAllObjectCard
();
var
deckTemp
=
deck
.
getAllObjectCard
();
foreach
(
var
item
in
deckTemp
)
foreach
(
var
item
in
deckTemp
)
{
{
try
try
{
{
...
@@ -342,7 +347,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -342,7 +347,7 @@ public class DeckManager : ServantWithCardDescription
var
rid
=
item
.
gameObject
.
GetComponent
<
Rigidbody
>();
var
rid
=
item
.
gameObject
.
GetComponent
<
Rigidbody
>();
if
(
rid
==
null
)
if
(
rid
==
null
)
{
{
rid
=
item
.
gameObject
.
AddComponent
<
Rigidbody
>();
rid
=
item
.
gameObject
.
AddComponent
<
Rigidbody
>();
}
}
rid
.
AddForce
(
0.7f
*
(
item
.
transform
.
position
+
new
Vector3
(
0
,
30
-
Vector3
.
Distance
(
item
.
transform
.
position
,
Vector3
.
zero
),
0
))
/
Program
.
deltaTime
);
rid
.
AddForce
(
0.7f
*
(
item
.
transform
.
position
+
new
Vector3
(
0
,
30
-
Vector3
.
Distance
(
item
.
transform
.
position
,
Vector3
.
zero
),
0
))
/
Program
.
deltaTime
);
}
}
...
@@ -370,14 +375,14 @@ public class DeckManager : ServantWithCardDescription
...
@@ -370,14 +375,14 @@ public class DeckManager : ServantWithCardDescription
bool
detailPanelShiftedTemp
=
false
;
bool
detailPanelShiftedTemp
=
false
;
void
shiftDetailPanel
(
bool
dragged
)
void
shiftDetailPanel
(
bool
dragged
)
{
{
detailPanelShiftedTemp
=
dragged
;
detailPanelShiftedTemp
=
dragged
;
if
(
isShowed
&&
detailShowed
)
if
(
isShowed
&&
detailShowed
)
{
{
if
(
dragged
)
if
(
dragged
)
{
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
color
=
new
Color
(
1
,
1
,
1
,
0.7f
);
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
color
=
new
Color
(
1
,
1
,
1
,
0.7f
);
}
}
else
else
{
{
...
@@ -389,7 +394,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -389,7 +394,7 @@ public class DeckManager : ServantWithCardDescription
void
refreshDetail
()
void
refreshDetail
()
{
{
if
(
gameObjectDetailedSearch
!=
null
)
if
(
gameObjectDetailedSearch
!=
null
)
{
{
if
(
isShowed
)
if
(
isShowed
)
{
{
...
@@ -630,6 +635,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -630,6 +635,7 @@ public class DeckManager : ServantWithCardDescription
getDefence_UP
(),
getDefence_UP
(),
getP_UP
(),
getP_UP
(),
getYear_UP
(),
getYear_UP
(),
getOT
(),
getPack
(),
getPack
(),
getBanFilter
(),
getBanFilter
(),
currentBanlist
,
currentBanlist
,
...
@@ -640,16 +646,16 @@ public class DeckManager : ServantWithCardDescription
...
@@ -640,16 +646,16 @@ public class DeckManager : ServantWithCardDescription
);
);
print
(
result
);
print
(
result
);
UIHelper
.
trySetLableText
(
gameObjectSearch
,
"title_"
,
result
.
Count
.
ToString
());
UIHelper
.
trySetLableText
(
gameObjectSearch
,
"title_"
,
result
.
Count
.
ToString
());
//
UIInput_search.isSelected = true;
UIInput_search
.
isSelected
=
true
;
}
}
public
YGOSharp
.
Banlist
currentBanlist
=
null
;
public
YGOSharp
.
Banlist
currentBanlist
=
null
;
List
<
YGOSharp
.
Card
>
PrintedResult
=
new
List
<
YGOSharp
.
Card
>();
List
<
YGOSharp
.
Card
>
PrintedResult
=
new
List
<
YGOSharp
.
Card
>();
void
print
(
List
<
YGOSharp
.
Card
>
result
)
void
print
(
List
<
YGOSharp
.
Card
>
result
)
{
{
if
(
superScrollView
!=
null
)
if
(
superScrollView
!=
null
)
{
{
PrintedResult
=
result
;
PrintedResult
=
result
;
if
(
condition
==
Condition
.
editDeck
)
if
(
condition
==
Condition
.
editDeck
)
...
@@ -677,9 +683,9 @@ public class DeckManager : ServantWithCardDescription
...
@@ -677,9 +683,9 @@ public class DeckManager : ServantWithCardDescription
bool
ifType
(
string
str
)
bool
ifType
(
string
str
)
{
{
bool
re
=
false
;
bool
re
=
false
;
foreach
(
var
item
in
seconds
)
foreach
(
var
item
in
seconds
)
{
{
if
(
str
==
item
)
if
(
str
==
item
)
{
{
re
=
true
;
re
=
true
;
break
;
break
;
...
@@ -820,6 +826,28 @@ public class DeckManager : ServantWithCardDescription
...
@@ -820,6 +826,28 @@ public class DeckManager : ServantWithCardDescription
return
returnValue
;
return
returnValue
;
}
}
int
getOT
()
{
int
returnValue
=
0
;
if
(
UIPopupList_ban
.
value
==
GameStringManager
.
get_unsafe
(
1240
))
{
returnValue
=
1
;
}
if
(
UIPopupList_ban
.
value
==
GameStringManager
.
get_unsafe
(
1241
))
{
returnValue
=
2
;
}
if
(
UIPopupList_ban
.
value
==
GameStringManager
.
get_unsafe
(
1242
))
{
returnValue
=
3
;
}
if
(
UIPopupList_ban
.
value
==
GameStringManager
.
get_unsafe
(
1243
))
{
returnValue
=
4
;
}
return
returnValue
;
}
UInt32
getRaceFilter
()
UInt32
getRaceFilter
()
{
{
UInt32
returnValue
=
0
;
UInt32
returnValue
=
0
;
...
@@ -1097,7 +1125,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1097,7 +1125,7 @@ public class DeckManager : ServantWithCardDescription
t_unmber
=
create_s
(
Program
.
I
().
mod_ocgcore_number
,
new
Vector3
(-
16.5f
,
0
,
2.6f
),
new
Vector3
(
90
,
0
,
0
),
true
).
GetComponent
<
number_loader
>();
t_unmber
=
create_s
(
Program
.
I
().
mod_ocgcore_number
,
new
Vector3
(-
16.5f
,
0
,
2.6f
),
new
Vector3
(
90
,
0
,
0
),
true
).
GetComponent
<
number_loader
>();
extra_unmber
=
create_s
(
Program
.
I
().
mod_ocgcore_number
,
new
Vector3
(-
16.5f
,
0
,
-
5.3f
),
new
Vector3
(
90
,
0
,
0
),
true
).
GetComponent
<
number_loader
>();
extra_unmber
=
create_s
(
Program
.
I
().
mod_ocgcore_number
,
new
Vector3
(-
16.5f
,
0
,
-
5.3f
),
new
Vector3
(
90
,
0
,
0
),
true
).
GetComponent
<
number_loader
>();
side_number
=
create_s
(
Program
.
I
().
mod_ocgcore_number
,
new
Vector3
(-
16.5f
,
0
,
-
11f
),
new
Vector3
(
90
,
0
,
0
),
true
).
GetComponent
<
number_loader
>();
side_number
=
create_s
(
Program
.
I
().
mod_ocgcore_number
,
new
Vector3
(-
16.5f
,
0
,
-
11f
),
new
Vector3
(
90
,
0
,
0
),
true
).
GetComponent
<
number_loader
>();
switch
(
condition
)
switch
(
condition
)
{
{
case
Condition
.
editDeck
:
case
Condition
.
editDeck
:
boxCollider
.
size
=
new
Vector3
(
1
,
1
,
1
);
boxCollider
.
size
=
new
Vector3
(
1
,
1
,
1
);
...
@@ -1298,7 +1326,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1298,7 +1326,7 @@ public class DeckManager : ServantWithCardDescription
{
{
if
(
cardInDragging
!=
null
)
if
(
cardInDragging
!=
null
)
{
{
if
(
Input
.
GetKey
(
KeyCode
.
LeftControl
)
||
Input
.
GetKey
(
KeyCode
.
RightControl
))
if
(
Input
.
GetKey
(
KeyCode
.
LeftControl
)
||
Input
.
GetKey
(
KeyCode
.
RightControl
))
{
{
//
//
}
}
...
@@ -1338,9 +1366,9 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1338,9 +1366,9 @@ public class DeckManager : ServantWithCardDescription
if
(
MonoCardInDeckManager_
!=
null
)
if
(
MonoCardInDeckManager_
!=
null
)
{
{
bool
isSide
=
false
;
bool
isSide
=
false
;
for
(
int
i
=
0
;
i
<
deck
.
ISide
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
deck
.
ISide
.
Count
;
i
++)
{
{
if
(
MonoCardInDeckManager_
==
deck
.
ISide
[
i
])
if
(
MonoCardInDeckManager_
==
deck
.
ISide
[
i
])
{
{
isSide
=
true
;
isSide
=
true
;
}
}
...
@@ -1386,7 +1414,12 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1386,7 +1414,12 @@ public class DeckManager : ServantWithCardDescription
card
.
transform
.
position
=
card
.
getGoodPosition
(
4
);
card
.
transform
.
position
=
card
.
getGoodPosition
(
4
);
card
.
cardData
=
data
;
card
.
cardData
=
data
;
card
.
gameObject
.
layer
=
16
;
card
.
gameObject
.
layer
=
16
;
if
(
if
(
Input
.
GetKey
(
KeyCode
.
LeftShift
)
||
(
Input
.
GetKey
(
KeyCode
.
RightShift
)))
{
deck
.
ISide
.
Add
(
card
);
deck
.
Side
.
Add
(
card
.
cardData
.
Id
);
}
else
if
(
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
||
||
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
...
@@ -1453,18 +1486,6 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1453,18 +1486,6 @@ public class DeckManager : ServantWithCardDescription
{
{
switch
(
flag
)
switch
(
flag
)
{
{
case
1
:
{
deck
.
Main
.
Add
(
code
);
deck
.
Deck_O
.
Main
.
Add
(
code
);
}
break
;
case
2
:
{
deck
.
Extra
.
Add
(
code
);
deck
.
Deck_O
.
Extra
.
Add
(
code
);
}
break
;
case
3
:
case
3
:
{
{
deck
.
Side
.
Add
(
code
);
deck
.
Side
.
Add
(
code
);
...
@@ -1472,6 +1493,25 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1472,6 +1493,25 @@ public class DeckManager : ServantWithCardDescription
}
}
break
;
break
;
default
:
default
:
{
YGOSharp
.
Card
card
=
YGOSharp
.
CardsManager
.
Get
(
code
);
if
((
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
||
(
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
||
(
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
||
(
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
link
)
>
0
)
{
deck
.
Extra
.
Add
(
code
);
deck
.
Deck_O
.
Extra
.
Add
(
code
);
}
else
{
deck
.
Main
.
Add
(
code
);
deck
.
Deck_O
.
Main
.
Add
(
code
);
}
}
break
;
break
;
}
}
}
}
...
@@ -1492,7 +1532,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1492,7 +1532,7 @@ public class DeckManager : ServantWithCardDescription
else
else
{
{
YGOSharp
.
Deck
r
=
new
YGOSharp
.
Deck
();
YGOSharp
.
Deck
r
=
new
YGOSharp
.
Deck
();
foreach
(
var
item
in
deck
.
Deck_O
.
Main
)
foreach
(
var
item
in
deck
.
Deck_O
.
Main
)
{
{
r
.
Main
.
Add
(
item
);
r
.
Main
.
Add
(
item
);
r
.
Deck_O
.
Main
.
Add
(
item
);
r
.
Deck_O
.
Main
.
Add
(
item
);
...
@@ -1507,7 +1547,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1507,7 +1547,7 @@ public class DeckManager : ServantWithCardDescription
r
.
Extra
.
Add
(
item
);
r
.
Extra
.
Add
(
item
);
r
.
Deck_O
.
Extra
.
Add
(
item
);
r
.
Deck_O
.
Extra
.
Add
(
item
);
}
}
return
r
;
return
r
;
}
}
}
}
...
@@ -1619,7 +1659,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1619,7 +1659,7 @@ public class DeckManager : ServantWithCardDescription
MonoCardInDeckManager
createCard
()
MonoCardInDeckManager
createCard
()
{
{
MonoCardInDeckManager
r
=
null
;
MonoCardInDeckManager
r
=
null
;
if
(
diedCards
.
Count
>
0
)
if
(
diedCards
.
Count
>
0
)
{
{
r
=
diedCards
[
0
].
AddComponent
<
MonoCardInDeckManager
>();
r
=
diedCards
[
0
].
AddComponent
<
MonoCardInDeckManager
>();
diedCards
.
RemoveAt
(
0
);
diedCards
.
RemoveAt
(
0
);
...
@@ -1663,7 +1703,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1663,7 +1703,7 @@ public class DeckManager : ServantWithCardDescription
});
});
int
indexOfLogic
=
0
;
int
indexOfLogic
=
0
;
int
[]
hangshu
=
UIHelper
.
get_decklieshuArray
(
deck
.
Main
.
Count
);
int
[]
hangshu
=
UIHelper
.
get_decklieshuArray
(
deck
.
Main
.
Count
);
foreach
(
var
item
in
deck
.
Main
)
foreach
(
var
item
in
deck
.
Main
)
{
{
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
indexOfLogic
,
hangshu
);
Vector2
v
=
UIHelper
.
get_hang_lieArry
(
indexOfLogic
,
hangshu
);
Vector3
toVector
=
new
Vector3
(
UIHelper
.
get_left_right_index
(-
12.5f
,
12.5f
,
(
int
)
v
.
y
,
hangshu
[(
int
)
v
.
x
]),
0.5f
+
v
.
y
/
3f
+
v
.
x
/
3f
,
11.8f
-
v
.
x
*
4f
);
Vector3
toVector
=
new
Vector3
(
UIHelper
.
get_left_right_index
(-
12.5f
,
12.5f
,
(
int
)
v
.
y
,
hangshu
[(
int
)
v
.
x
]),
0.5f
+
v
.
y
/
3f
+
v
.
x
/
3f
,
11.8f
-
v
.
x
*
4f
);
...
@@ -1674,14 +1714,14 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1674,14 +1714,14 @@ public class DeckManager : ServantWithCardDescription
card
.
cardData
=
data
;
card
.
cardData
=
data
;
card
.
gameObject
.
layer
=
16
;
card
.
gameObject
.
layer
=
16
;
deck
.
IMain
.
Add
(
card
);
deck
.
IMain
.
Add
(
card
);
card
.
tweenToVectorAndFall
(
toVector
,
new
Vector3
(
90
,
0
,
0
));
card
.
tweenToVectorAndFall
(
toVector
,
new
Vector3
(
90
,
0
,
0
));
});
});
indexOfLogic
++;
indexOfLogic
++;
}
}
indexOfLogic
=
0
;
indexOfLogic
=
0
;
foreach
(
var
item
in
deck
.
Extra
)
foreach
(
var
item
in
deck
.
Extra
)
{
{
Vector3
toVector
=
new
Vector3
(
UIHelper
.
get_left_right_indexZuo
(-
12.5f
,
12.5f
,
indexOfLogic
,
deck
.
Extra
.
Count
,
10
),
0.5f
+
(
float
)
indexOfLogic
/
3f
,
-
6.2f
);
Vector3
toVector
=
new
Vector3
(
UIHelper
.
get_left_right_indexZuo
(-
12.5f
,
12.5f
,
indexOfLogic
,
deck
.
Extra
.
Count
,
10
),
0.5f
+
(
float
)
indexOfLogic
/
3f
,
-
6.2f
);
YGOSharp
.
Card
data
=
YGOSharp
.
CardsManager
.
Get
(
item
);
YGOSharp
.
Card
data
=
YGOSharp
.
CardsManager
.
Get
(
item
);
safeGogo
(
indexOfLogic
*
90
,
()
=>
safeGogo
(
indexOfLogic
*
90
,
()
=>
{
{
...
@@ -1755,12 +1795,12 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1755,12 +1795,12 @@ public class DeckManager : ServantWithCardDescription
toAngle
=
new
Vector3
(
87f
-
(
deck
.
ISide
.
Count
-
10f
)
*
0.4f
,
-
90
,
-
90
);
toAngle
=
new
Vector3
(
87f
-
(
deck
.
ISide
.
Count
-
10f
)
*
0.4f
,
-
90
,
-
90
);
}
}
}
}
Vector3
toVector
=
new
Vector3
(
UIHelper
.
get_left_right_indexZuo
(-
12.5f
,
12.5f
,
i
,
deck
.
ISide
.
Count
,
10
),
0.6f
+
Mathf
.
Sin
((
90
-
toAngle
.
x
)
/
180f
*
Mathf
.
PI
)
*
k
,
-
12f
);
Vector3
toVector
=
new
Vector3
(
UIHelper
.
get_left_right_indexZuo
(-
12.5f
,
12.5f
,
i
,
deck
.
ISide
.
Count
,
10
),
0.6f
+
Mathf
.
Sin
((
90
-
toAngle
.
x
)
/
180f
*
Mathf
.
PI
)
*
k
,
-
12f
);
deck
.
ISide
[
i
].
tweenToVectorAndFall
(
toVector
,
toAngle
);
deck
.
ISide
[
i
].
tweenToVectorAndFall
(
toVector
,
toAngle
);
}
}
}
}
public
void
FromObjectDeckToCodedDeck
(
bool
order
=
false
)
public
void
FromObjectDeckToCodedDeck
(
bool
order
=
false
)
{
{
ArrangeObjectDeck
(
order
);
ArrangeObjectDeck
(
order
);
deck
.
Main
.
Clear
();
deck
.
Main
.
Clear
();
...
@@ -1780,7 +1820,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1780,7 +1820,7 @@ public class DeckManager : ServantWithCardDescription
}
}
}
}
public
void
setGoodLooking
(
bool
side
=
false
)
public
void
setGoodLooking
(
bool
side
=
false
)
{
{
try
try
{
{
...
@@ -1791,9 +1831,9 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1791,9 +1831,9 @@ public class DeckManager : ServantWithCardDescription
UnityEngine
.
Debug
.
Log
(
e
);
UnityEngine
.
Debug
.
Log
(
e
);
}
}
List
<
YGOSharp
.
Card
>
result
=
new
List
<
YGOSharp
.
Card
>();
List
<
YGOSharp
.
Card
>
result
=
new
List
<
YGOSharp
.
Card
>();
if
(
side
)
if
(
side
)
{
{
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
sideReference
)
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
sideReference
)
{
{
result
.
Add
(
YGOSharp
.
CardsManager
.
Get
(
item
.
Value
));
result
.
Add
(
YGOSharp
.
CardsManager
.
Get
(
item
.
Value
));
}
}
...
@@ -1821,7 +1861,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1821,7 +1861,7 @@ public class DeckManager : ServantWithCardDescription
Program
.
go
(
300
,
superScrollView
.
toTop
);
Program
.
go
(
300
,
superScrollView
.
toTop
);
Program
.
go
(
400
,
superScrollView
.
toTop
);
Program
.
go
(
400
,
superScrollView
.
toTop
);
Program
.
go
(
500
,
superScrollView
.
toTop
);
Program
.
go
(
500
,
superScrollView
.
toTop
);
if
(
side
)
if
(
side
)
{
{
UIInput_search
.
value
=
InterString
.
Get
(
"对手使用过的卡↓"
);
UIInput_search
.
value
=
InterString
.
Get
(
"对手使用过的卡↓"
);
UIInput_search
.
isSelected
=
false
;
UIInput_search
.
isSelected
=
false
;
...
@@ -1829,7 +1869,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1829,7 +1869,7 @@ public class DeckManager : ServantWithCardDescription
else
else
{
{
UIInput_search
.
value
=
""
;
UIInput_search
.
value
=
""
;
//
UIInput_search.isSelected = true;
UIInput_search
.
isSelected
=
true
;
}
}
}
}
}
}
Assets/YGOSharp/CardsManager.cs
View file @
b1d1b754
...
@@ -22,9 +22,9 @@ namespace YGOSharp
...
@@ -22,9 +22,9 @@ namespace YGOSharp
nullString
+=
"欢迎使用:\r\nYGOPro2 For Android"
;
nullString
+=
"欢迎使用:\r\nYGOPro2 For Android"
;
nullString
+=
"\r\n\r\n"
;
nullString
+=
"\r\n\r\n"
;
nullString
+=
"源码:"
;
nullString
+=
"源码:"
;
nullString
+=
"\r\n「Android」\r\n[url=https://github.com/Unicorn369/YGOPro2_Droid][u]https://github.com/Unicorn369/YGOPro2_Droid[/u][/url]"
;
nullString
+=
"\r\n「Android」\r\n[url=https://github.com/Unicorn369/YGOPro2_Droid][u]https://github.com/Unicorn369/YGOPro2_Droid[/u][/url]"
;
//nullString += "\r\nWindows:[url=https://github.com/lllyasviel/YGOProUnity_V2][u]https://github.com/lllyasviel/YGOProUnity_V2[/u][/url]";
//nullString += "\r\nWindows:[url=https://github.com/lllyasviel/YGOProUnity_V2][u]https://github.com/lllyasviel/YGOProUnity_V2[/u][/url]";
nullString
+=
"\r\n\r\n「Windows」\r\n[url=https://github.com/mercury233/ygopro2][u]https://github.com/mercury233/ygopro2[/u][/url]"
;
nullString
+=
"\r\n\r\n「Windows」\r\n[url=https://github.com/mercury233/ygopro2][u]https://github.com/mercury233/ygopro2[/u][/url]"
;
nullString
+=
"\r\n\r\n\r\n"
;
nullString
+=
"\r\n\r\n\r\n"
;
nullString
+=
"欢迎加入QQ群:"
;
nullString
+=
"欢迎加入QQ群:"
;
nullString
+=
"\r\n①:[url=https://jq.qq.com/?_wv=1027&k=5nq6xJe][u]649612818[/u][/url]"
;
nullString
+=
"\r\n①:[url=https://jq.qq.com/?_wv=1027&k=5nq6xJe][u]649612818[/u][/url]"
;
...
@@ -103,6 +103,7 @@ namespace YGOSharp
...
@@ -103,6 +103,7 @@ namespace YGOSharp
int
getDefence_UP
,
int
getDefence_UP
,
int
getP_UP
,
int
getP_UP
,
int
getYear_UP
,
int
getYear_UP
,
int
getOT
,
string
getPack
,
string
getPack
,
int
getBAN
,
int
getBAN
,
Banlist
banlist
,
Banlist
banlist
,
...
@@ -127,7 +128,7 @@ namespace YGOSharp
...
@@ -127,7 +128,7 @@ namespace YGOSharp
{
{
if
(((
card
.
Type
&
getTypeFilter
))
==
getTypeFilter
||
getTypeFilter
==
0
)
if
(((
card
.
Type
&
getTypeFilter
))
==
getTypeFilter
||
getTypeFilter
==
0
)
{
{
if
((
card
.
Race
&
getRaceFilter
)
>
0
||
getRaceFilter
==
0
)
if
((
card
.
Race
&
getRaceFilter
)
>
0
||
getRaceFilter
==
0
)
{
{
if
((
card
.
Attribute
&
getAttributeFilter
)
>
0
||
getAttributeFilter
==
0
)
if
((
card
.
Attribute
&
getAttributeFilter
)
>
0
||
getAttributeFilter
==
0
)
{
{
...
@@ -145,9 +146,12 @@ namespace YGOSharp
...
@@ -145,9 +146,12 @@ namespace YGOSharp
{
{
if
(
getBAN
==
-
233
||
banlist
==
null
||
banlist
.
GetQuantity
(
card
.
Id
)
==
getBAN
)
if
(
getBAN
==
-
233
||
banlist
==
null
||
banlist
.
GetQuantity
(
card
.
Id
)
==
getBAN
)
{
{
if
(
get
Pack
==
""
||
card
.
packFullName
==
getPack
)
if
(
get
OT
==
0
||
getOT
==
card
.
Ot
)
{
{
returnValue
.
Add
(
card
);
if
(
getPack
==
""
||
card
.
packFullName
==
getPack
)
{
returnValue
.
Add
(
card
);
}
}
}
}
}
}
}
...
...
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