Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
minh khanh
MDPro3
Commits
8f539b6f
Commit
8f539b6f
authored
Aug 03, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix windbot diyDeck selection bug
parent
33c59667
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
Assets/Scripts/MDPro3/Servants/Solo.cs
Assets/Scripts/MDPro3/Servants/Solo.cs
+6
-7
Assets/Scripts/MDPro3/UI/SuperScrollView/SuperScrollViewItemTwoStageForSolo.cs
.../UI/SuperScrollView/SuperScrollViewItemTwoStageForSolo.cs
+5
-3
No files found.
Assets/Scripts/MDPro3/Servants/Solo.cs
View file @
8f539b6f
...
...
@@ -29,7 +29,6 @@ namespace MDPro3
public
InputField
inputDraw
;
public
GameObject
btnDeck
;
public
static
readonly
int
diyAI
=
6
;
public
static
string
port
;
public
class
BotInfo
...
...
@@ -175,11 +174,11 @@ namespace MDPro3
Program
.
I
().
ShiftToServant
(
Program
.
I
().
selectDeck
);
}
string
GetWindBotCommand
(
int
aiCode
)
string
GetWindBotCommand
(
int
aiCode
,
bool
diyDeck
)
{
BotInfo
bot
=
bots
[
aiCode
];
string
aiCommand
=
bot
.
command
;
if
(
aiCode
==
diyAI
)
if
(
diyDeck
)
{
string
selectedDeck
=
btnDeck
.
transform
.
GetChild
(
0
).
GetComponent
<
Text
>().
text
;
if
(!
File
.
Exists
(
Program
.
deckPath
+
selectedDeck
+
Program
.
ydkExpansion
))
...
...
@@ -200,16 +199,16 @@ namespace MDPro3
return
aiCommand
;
}
public
void
StartAIForSolo
(
int
aiCode
)
public
void
StartAIForSolo
(
int
aiCode
,
bool
diyDeck
)
{
string
aiCommand
=
GetWindBotCommand
(
aiCode
);
string
aiCommand
=
GetWindBotCommand
(
aiCode
,
diyDeck
);
if
(
aiCommand
!=
string
.
Empty
)
Launch
(
aiCommand
,
toggleLockHand
.
isOn
,
toggleNoCheck
.
isOn
,
toggleNoShuffle
.
isOn
);
}
public
void
StartAIForRoom
(
int
aiCode
)
public
void
StartAIForRoom
(
int
aiCode
,
bool
diyDeck
)
{
string
aiCommand
=
GetWindBotCommand
(
aiCode
);
string
aiCommand
=
GetWindBotCommand
(
aiCode
,
diyDeck
);
if
(
aiCommand
!=
string
.
Empty
)
{
StartWindBot
(
aiCommand
,
TcpHelper
.
joinedAddress
,
TcpHelper
.
joinedPort
,
TcpHelper
.
joinedPassword
,
toggleLockHand
.
isOn
);
...
...
Assets/Scripts/MDPro3/UI/SuperScrollView/SuperScrollViewItemTwoStageForSolo.cs
View file @
8f539b6f
...
...
@@ -12,13 +12,14 @@ namespace MDPro3.UI
public
RawImage
face
;
public
Solo
.
BotInfo
botInfo
;
bool
diyDeck
;
public
override
void
OnSelected
()
{
base
.
OnSelected
();
Program
.
I
().
solo
.
superScrollView
.
selected
=
id
;
Program
.
I
().
solo
.
description
.
text
=
botInfo
.
desc
;
Program
.
I
().
solo
.
description
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
Vector2
.
zero
;
if
(
id
==
Solo
.
diyAI
)
if
(
diyDeck
)
Program
.
I
().
solo
.
btnDeck
.
SetActive
(
true
);
else
Program
.
I
().
solo
.
btnDeck
.
SetActive
(
false
);
...
...
@@ -28,12 +29,13 @@ namespace MDPro3.UI
{
base
.
Refresh
();
title
.
text
=
botInfo
.
name
;
diyDeck
=
botInfo
.
command
.
Contains
(
"Lucky"
);
action
=
()
=>
{
if
(
Solo
.
condition
==
Solo
.
Condition
.
ForSolo
)
Program
.
I
().
solo
.
StartAIForSolo
(
id
);
Program
.
I
().
solo
.
StartAIForSolo
(
id
,
diyDeck
);
else
Program
.
I
().
solo
.
StartAIForRoom
(
id
);
Program
.
I
().
solo
.
StartAIForRoom
(
id
,
diyDeck
);
};
}
...
...
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