Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro2
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
赤子奈落
MDPro2
Commits
ab3d79bc
Commit
ab3d79bc
authored
Jul 22, 2023
by
赤子奈落
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bugs in card selection
parent
6de17c3f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
45 deletions
+74
-45
Assets/MD/Scripts/CardDetail.cs
Assets/MD/Scripts/CardDetail.cs
+42
-35
Assets/MD/Scripts/CardSelectionHandler.cs
Assets/MD/Scripts/CardSelectionHandler.cs
+21
-8
Assets/MD/main.unity
Assets/MD/main.unity
+1
-0
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+10
-2
No files found.
Assets/MD/Scripts/CardDetail.cs
View file @
ab3d79bc
...
@@ -216,51 +216,58 @@ public class CardDetail : MonoBehaviour
...
@@ -216,51 +216,58 @@ public class CardDetail : MonoBehaviour
{
{
base_property
.
bottomAnchor
.
absolute
=
-
120
;
base_property
.
bottomAnchor
.
absolute
=
-
120
;
}
}
try
if
(
origin
.
Desc
.
Contains
(
"Ч"
))
{
{
string
text_pendulum
=
""
;
if
(
origin
.
Desc
.
Contains
(
"【怪兽效果】"
))
string
text_other
=
""
;
string
temp
=
origin
.
Desc
.
Split
(
"\r\n"
)[
1
];
if
(
temp
.
Split
(
"\r\nЧ\r\n"
).
Length
>
1
)
{
{
text_pendulum
=
temp
.
Split
(
"\r\nЧ\r\n"
)[
0
];
string
text_pendulum
=
""
;
text_other
=
temp
.
Split
(
"\r\nЧ\r\n"
)[
1
];
string
text_other
=
""
;
string
temp
=
origin
.
Desc
.
Split
(
"→\r\n"
)[
1
];
if
(
temp
.
Split
(
"\r\n【怪兽效果】\r\n"
).
Length
>
1
)
{
text_pendulum
=
temp
.
Split
(
"\r\n【怪兽效果】\r\n"
)[
0
];
text_other
=
temp
.
Split
(
"\r\n【怪兽效果】\r\n"
)[
1
];
}
else
text_other
=
temp
.
Replace
(
"【怪兽效果】\r\n"
,
""
);
label_pendulum_description
.
text
=
text_pendulum
;
label_description
.
text
=
text_other
;
base_pendulum
.
alpha
=
1f
;
base_pendulum
.
bottomAnchor
.
absolute
=
-
250
;
base_pendulum
.
topAnchor
.
absolute
=
-
20
;
}
}
else
else
if
(
origin
.
Desc
.
Contains
(
"【怪兽描述】"
))
text_other
=
temp
.
Replace
(
"Ч\r\n"
,
""
);
label_pendulum_description
.
text
=
text_pendulum
;
label_description
.
text
=
text_other
;
base_pendulum
.
alpha
=
1f
;
base_pendulum
.
bottomAnchor
.
absolute
=
-
250
;
base_pendulum
.
topAnchor
.
absolute
=
-
20
;
}
else
if
(
origin
.
Desc
.
Contains
(
""
))
{
string
text_pendulum
=
""
;
string
text_other
=
""
;
string
temp
=
origin
.
Desc
.
Split
(
"\r\n"
)[
1
];
if
(
temp
.
Split
(
"\r\n\r\n"
).
Length
>
1
)
{
{
text_pendulum
=
temp
.
Split
(
"\r\n\r\n"
)[
0
];
string
text_pendulum
=
""
;
text_other
=
temp
.
Split
(
"\r\n\r\n"
)[
1
];
string
text_other
=
""
;
string
temp
=
origin
.
Desc
.
Split
(
"→\r\n"
)[
1
];
if
(
temp
.
Split
(
"\r\n【怪兽描述】\r\n"
).
Length
>
1
)
{
text_pendulum
=
temp
.
Split
(
"\r\n【怪兽描述】\r\n"
)[
0
];
text_other
=
temp
.
Split
(
"\r\n【怪兽描述】\r\n"
)[
1
];
}
else
text_other
=
temp
.
Replace
(
"【怪兽描述】\r\n"
,
""
);
label_pendulum_description
.
text
=
text_pendulum
;
label_description
.
text
=
text_other
;
base_pendulum
.
alpha
=
1f
;
base_pendulum
.
bottomAnchor
.
absolute
=
-
250
;
base_pendulum
.
topAnchor
.
absolute
=
-
20
;
}
}
else
else
text_other
=
temp
.
Replace
(
"\r\n"
,
""
);
{
label_pendulum_description
.
text
=
text_pendulum
;
base_pendulum
.
bottomAnchor
.
absolute
=
0
;
label_description
.
text
=
text_other
;
base_pendulum
.
topAnchor
.
absolute
=
50
;
base_pendulum
.
alpha
=
1
f
;
base_pendulum
.
alpha
=
0
f
;
base_pendulum
.
bottomAnchor
.
absolute
=
-
250
;
label_description
.
text
=
origin
.
Desc
;
base_pendulum
.
topAnchor
.
absolute
=
-
20
;
}
}
}
else
catch
{
{
base_pendulum
.
bottomAnchor
.
absolute
=
0
;
Debug
.
LogError
(
"灵摆效果文本分段失败!!!"
);
base_pendulum
.
topAnchor
.
absolute
=
50
;
base_pendulum
.
alpha
=
0f
;
label_description
.
text
=
origin
.
Desc
;
}
}
Program
.
I
().
cardDescription
.
FrameColor
(
origin
,
false
);
Program
.
I
().
cardDescription
.
FrameColor
(
origin
,
false
);
back_name
.
color
=
Program
.
I
().
cardDescription
.
color1
;
back_name
.
color
=
Program
.
I
().
cardDescription
.
color1
;
back_property
.
color
=
Program
.
I
().
cardDescription
.
color1
;
back_property
.
color
=
Program
.
I
().
cardDescription
.
color1
;
...
...
Assets/MD/Scripts/CardSelectionHandler.cs
View file @
ab3d79bc
...
@@ -44,6 +44,7 @@ public class CardSelectionHandler : MonoBehaviour
...
@@ -44,6 +44,7 @@ public class CardSelectionHandler : MonoBehaviour
public
bool
exitable
;
public
bool
exitable
;
public
bool
finishable
;
public
bool
finishable
;
bool
tempHide
;
bool
tempHide
;
public
bool
hideByRMS
;
private
void
Start
()
private
void
Start
()
{
{
base_cardSelect
=
transform
.
GetChild
(
0
).
GetChild
(
0
).
GetComponent
<
UI2DSprite
>();
base_cardSelect
=
transform
.
GetChild
(
0
).
GetChild
(
0
).
GetComponent
<
UI2DSprite
>();
...
@@ -69,8 +70,6 @@ public class CardSelectionHandler : MonoBehaviour
...
@@ -69,8 +70,6 @@ public class CardSelectionHandler : MonoBehaviour
Debug
.
Log
(
"没有卡需要选择,请检查。"
);
Debug
.
Log
(
"没有卡需要选择,请检查。"
);
return
;
return
;
}
}
//初始化
list
.
localPosition
=
Vector3
.
zero
;
list
.
localPosition
=
Vector3
.
zero
;
isShowed
=
true
;
isShowed
=
true
;
gameObject
.
transform
.
DOLocalMoveY
(-
340
,
0.2f
);
gameObject
.
transform
.
DOLocalMoveY
(-
340
,
0.2f
);
...
@@ -81,6 +80,7 @@ public class CardSelectionHandler : MonoBehaviour
...
@@ -81,6 +80,7 @@ public class CardSelectionHandler : MonoBehaviour
this
.
ES_max
=
ES_max
;
this
.
ES_max
=
ES_max
;
this
.
exitable
=
exitable
;
this
.
exitable
=
exitable
;
tempHide
=
false
;
tempHide
=
false
;
hideByRMS
=
false
;
if
(
Program
.
I
().
setting
.
setting
.
confirmLeft
.
value
)
if
(
Program
.
I
().
setting
.
setting
.
confirmLeft
.
value
)
{
{
...
@@ -128,13 +128,17 @@ public class CardSelectionHandler : MonoBehaviour
...
@@ -128,13 +128,17 @@ public class CardSelectionHandler : MonoBehaviour
}
}
cardsOnSelection
.
Clear
();
cardsOnSelection
.
Clear
();
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
List
<
gameCard
>
cleaned
=
new
List
<
gameCard
>();
foreach
(
var
card
in
cards
)
{
if
(!
cleaned
.
Contains
(
card
))
cleaned
.
Add
(
card
);
}
cards
=
cleaned
;
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
{
{
if
(
i
>=
1
)
{
if
(
cards
[
i
]
==
cards
[
i
-
1
])
return
;
}
bool
theFirst
=
false
;
bool
theFirst
=
false
;
bool
theLast
=
false
;
bool
theLast
=
false
;
if
(
i
==
0
)
if
(
i
==
0
)
...
@@ -225,6 +229,14 @@ public class CardSelectionHandler : MonoBehaviour
...
@@ -225,6 +229,14 @@ public class CardSelectionHandler : MonoBehaviour
Destroy
(
card
.
arrow
);
Destroy
(
card
.
arrow
);
}
}
public
void
ShowWithoutAction
()
{
core
.
Sleep
(
12
);
isShowed
=
true
;
hideByRMS
=
false
;
gameObject
.
transform
.
DOLocalMoveY
(-
340
,
0.2f
);
}
void
TempHide
()
void
TempHide
()
{
{
if
(!
tempHide
)
if
(!
tempHide
)
...
@@ -303,6 +315,7 @@ public class CardSelectionHandler : MonoBehaviour
...
@@ -303,6 +315,7 @@ public class CardSelectionHandler : MonoBehaviour
values
.
Add
(
new
messageSystemValue
{
hint
=
InterString
.
Get
(
"取消"
),
value
=
"hide"
});
values
.
Add
(
new
messageSystemValue
{
hint
=
InterString
.
Get
(
"取消"
),
value
=
"hide"
});
core
.
RMSshow_singleChoice
(
"return"
,
values
);
core
.
RMSshow_singleChoice
(
"return"
,
values
);
hideByRMS
=
true
;
}
}
}
}
break
;
break
;
...
...
Assets/MD/main.unity
View file @
ab3d79bc
...
@@ -270962,6 +270962,7 @@ MonoBehaviour:
...
@@ -270962,6 +270962,7 @@ MonoBehaviour:
alreadySelected: 0
alreadySelected: 0
exitable: 0
exitable: 0
finishable: 0
finishable: 0
hideByRMS: 0
--- !u!1 &1731746415
--- !u!1 &1731746415
GameObject:
GameObject:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 0
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
ab3d79bc
...
@@ -5822,7 +5822,6 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5822,7 +5822,6 @@ public class Ocgcore : ServantWithCardDescription
break
;
break
;
case
GameMessage
.
SelectSum
:
case
GameMessage
.
SelectSum
:
Debug
.
Log
(
"SelectSum"
);
if
(
cardsSelectable
.
Count
<=
ES_min
)
if
(
cardsSelectable
.
Count
<=
ES_min
)
{
{
autoSendCards
();
autoSendCards
();
...
@@ -8434,7 +8433,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8434,7 +8433,11 @@ public class Ocgcore : ServantWithCardDescription
{
{
Debug
.
Log
(
e
);
Debug
.
Log
(
e
);
}
}
else
{
if
(
Program
.
I
().
cardSelection
.
hideByRMS
)
Program
.
I
().
cardSelection
.
ShowWithoutAction
();
}
break
;
break
;
case
"autoForceChainHandler"
:
case
"autoForceChainHandler"
:
if
(
result
[
0
].
value
!=
"hide"
)
if
(
result
[
0
].
value
!=
"hide"
)
...
@@ -8792,6 +8795,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8792,6 +8795,11 @@ public class Ocgcore : ServantWithCardDescription
Program
.
I
().
cardDetail
.
Hide
();
Program
.
I
().
cardDetail
.
Hide
();
return
;
return
;
}
}
else
if
(
PhaseUIBehaviour
.
isShowed
)
{
PhaseUIBehaviour
.
hide
();
return
;
}
else
if
(
Program
.
I
().
cardSelection
.
isShowed
&&
Program
.
I
().
cardSelection
.
exitable
)
else
if
(
Program
.
I
().
cardSelection
.
isShowed
&&
Program
.
I
().
cardSelection
.
exitable
)
{
{
Program
.
I
().
cardSelection
.
hide
();
Program
.
I
().
cardSelection
.
hide
();
...
...
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