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
JQY
MDPro3
Commits
d04b70b3
Commit
d04b70b3
authored
Nov 07, 2025
by
J114514
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
受伤后语音问题
parent
4e85be09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
22 deletions
+60
-22
Assets/Scripts/MDPro3/Duel/Message/VoiceMessage.cs
Assets/Scripts/MDPro3/Duel/Message/VoiceMessage.cs
+60
-22
No files found.
Assets/Scripts/MDPro3/Duel/Message/VoiceMessage.cs
View file @
d04b70b3
...
...
@@ -34,6 +34,7 @@ namespace MDPro3.Duel
private
bool
lastVoiceIsRelease
;
private
readonly
List
<
VoiceData
>
voiceData
=
new
();
private
readonly
List
<
VoiceData
>
delayVoiceData
=
new
();
#
endregion
...
...
@@ -140,7 +141,6 @@ namespace MDPro3.Duel
{
return
Config
.
GetBool
(
OcgCore
.
condition
+
"Voice"
,
false
);
}
private
static
bool
DamageIsBig
(
int
damage
)
{
if
(
damage
>=
2000
)
...
...
@@ -179,6 +179,13 @@ namespace MDPro3.Duel
}
voiceData
.
Clear
();
if
(
delayVoiceData
.
Count
>
0
)
{
for
(
int
i
=
0
;
i
<
delayVoiceData
.
Count
;
i
++)
voiceData
.
Add
(
delayVoiceData
[
i
]);
delayVoiceData
.
Clear
();
}
await
base
.
Process
(
p
);
...
...
@@ -194,15 +201,29 @@ namespace MDPro3.Duel
var
voiceTask
=
PlayVoiceAsync
();
var
clickTask
=
UniTask
.
WaitUntil
(()
=>
UserInput
.
MouseLeftDown
);
// if (!isInstantMessage)
// {
// }
// else if (needrecacc)
// {
// UniTask.Create(
// async () =>
// {
// }
// );
// }
var
clickTask
=
UniTask
.
WaitUntil
(()
=>
UserInput
.
MouseLeftDown
);
await
UniTask
.
WhenAny
(
voiceTask
,
clickTask
);
//Edit Voice code
if
(!
OcgCore
.
Accing
&&
needrecacc
)
if
(!
OcgCore
.
Accing
&&
needrecacc
)
{
Core
.
GetUI
<
MDPro3
.
UI
.
ServantUI
.
OcgCoreUI
>().
OnAcc
();
}
}
protected
override
UniTask
GameMessage_Start
(
BinaryReader
reader
)
...
...
@@ -690,17 +711,23 @@ namespace MDPro3.Duel
data
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
Damage
.
rawKvp
).
Value
.
shortName
;
data
.
num
=
GetVoiceNum
(
targetData
,
data
.
name
);
data
.
isHero
=
player
==
0
;
data
.
wait
=
fals
e
;
data
.
wait
=
tru
e
;
data
.
delay
=
0f
;
v
oiceData
.
Add
(
data
);
delayV
oiceData
.
Add
(
data
);
var
data2
=
new
VoiceData
();
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
DamageIsBig
(
value
)?
targetData
.
AfterBigDamage
.
rawKvp
:
targetData
.
AfterDamage
.
rawKvp
).
Value
.
shortName
;
if
(
DamageIsBig
(
value
))
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
AfterBigDamage
.
rawKvp
).
Value
.
shortName
;
else
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
AfterDamage
.
rawKvp
).
Value
.
shortName
;
data2
.
num
=
GetVoiceNum
(
targetData
,
data2
.
name
);
data2
.
isHero
=
player
==
0
;
data2
.
wait
=
false
;
data2
.
delay
=
0f
;
voiceData
.
Add
(
data2
);
data2
.
wait
=
true
;
data2
.
delay
=
0.26f
;
delayVoiceData
.
Add
(
data2
);
// isInstantMessage = true;
return
UniTask
.
CompletedTask
;
}
...
...
@@ -725,17 +752,23 @@ namespace MDPro3.Duel
data
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
CostDamage
.
rawKvp
).
Value
.
shortName
;
data
.
num
=
GetVoiceNum
(
targetData
,
data
.
name
);
data
.
isHero
=
player
==
0
;
data
.
wait
=
fals
e
;
data
.
wait
=
tru
e
;
data
.
delay
=
0f
;
v
oiceData
.
Add
(
data
);
delayV
oiceData
.
Add
(
data
);
var
data2
=
new
VoiceData
();
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
DamageIsBig
(
value
)?
targetData
.
AfterBigDamage
.
rawKvp
:
targetData
.
AfterDamage
.
rawKvp
).
Value
.
shortName
;
if
(
DamageIsBig
(
value
))
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
AfterBigDamage
.
rawKvp
).
Value
.
shortName
;
else
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
AfterDamage
.
rawKvp
).
Value
.
shortName
;
data2
.
num
=
GetVoiceNum
(
targetData
,
data2
.
name
);
data2
.
num
=
GetVoiceNum
(
targetData
,
data2
.
name
);
data2
.
isHero
=
player
==
0
;
data2
.
wait
=
false
;
data2
.
delay
=
0f
;
voiceData
.
Add
(
data2
);
data2
.
wait
=
true
;
data2
.
delay
=
0.26f
;
delayVoiceData
.
Add
(
data2
);
// isInstantMessage = true;
return
UniTask
.
CompletedTask
;
}
...
...
@@ -779,17 +812,22 @@ namespace MDPro3.Duel
data
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
Damage
.
rawKvp
).
Value
.
shortName
;
data
.
num
=
GetVoiceNum
(
targetData
,
data
.
name
);
data
.
isHero
=
player
==
0
;
data
.
wait
=
fals
e
;
data
.
wait
=
tru
e
;
data
.
delay
=
0f
;
v
oiceData
.
Add
(
data
);
delayV
oiceData
.
Add
(
data
);
var
data2
=
new
VoiceData
();
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
DamageIsBig
(
value
)?
targetData
.
AfterBigDamage
.
rawKvp
:
targetData
.
AfterDamage
.
rawKvp
).
Value
.
shortName
;
if
(
DamageIsBig
(
diff
))
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
AfterBigDamage
.
rawKvp
).
Value
.
shortName
;
else
data2
.
name
=
Tools
.
GetRandomDictionaryElement
(
targetData
.
AfterDamage
.
rawKvp
).
Value
.
shortName
;
data2
.
num
=
GetVoiceNum
(
targetData
,
data2
.
name
);
data2
.
num
=
GetVoiceNum
(
targetData
,
data2
.
name
);
data2
.
isHero
=
player
==
0
;
data2
.
wait
=
false
;
data2
.
delay
=
0f
;
voiceData
.
Add
(
data2
);
data2
.
wait
=
true
;
data2
.
delay
=
0.26f
;
delayVoiceData
.
Add
(
data2
);
// isInstantMessage = true;
return
UniTask
.
CompletedTask
;
}
...
...
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