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
34
Issues
34
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
赤子奈落
MDPro3
Commits
1391efa8
Commit
1391efa8
authored
May 01, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message switch
parent
e381d83f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3073 additions
and
58 deletions
+3073
-58
Assets/Main.unity
Assets/Main.unity
+2924
-50
Assets/Scripts/MDPro3/Servants/OcgCore.cs
Assets/Scripts/MDPro3/Servants/OcgCore.cs
+37
-7
Assets/Scripts/MDPro3/Servants/Setting.cs
Assets/Scripts/MDPro3/Servants/Setting.cs
+104
-1
Data/locales/zh-CN/translation.conf
Data/locales/zh-CN/translation.conf
+8
-0
No files found.
Assets/Main.unity
View file @
1391efa8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Assets/Scripts/MDPro3/Servants/OcgCore.cs
View file @
1391efa8
...
...
@@ -557,6 +557,14 @@ namespace MDPro3
Destroy
(
line
);
}
if
((
Input
.
GetKeyDown
(
KeyCode
.
Return
)
||
Input
.
GetKeyDown
(
KeyCode
.
KeypadEnter
))
&&
(!
Program
.
I
().
room
.
chatInput
.
isFocused
||
Program
.
I
().
room
.
chatInput
.
text
==
string
.
Empty
))
{
ToChat
();
}
if
(
Program
.
I
().
room
.
chatOn
)
return
;
...
...
@@ -582,13 +590,6 @@ namespace MDPro3
chainCondition
=
ChainCondition
.
No
;
OnTiming
();
}
if
((
Input
.
GetKeyDown
(
KeyCode
.
Return
)
||
Input
.
GetKeyDown
(
KeyCode
.
KeypadEnter
))
&&
(!
Program
.
I
().
room
.
chatInput
.
isFocused
||
Program
.
I
().
room
.
chatInput
.
text
==
string
.
Empty
))
{
ToChat
();
}
if
(
Input
.
GetKeyDown
(
KeyCode
.
Tab
))
{
OnLog
();
...
...
@@ -1688,8 +1689,37 @@ namespace MDPro3
MessageManager
.
Cast
(
content
);
}
bool
GetMessageConfig
(
int
player
)
{
bool
isPlayer
=
true
;
if
(
player
>
3
&&
player
!=
7
)
isPlayer
=
false
;
if
(
isPlayer
)
{
if
(
condition
==
Condition
.
Duel
&&
Config
.
Get
(
"DuelPlayerMessage"
,
"1"
)
==
"0"
)
return
false
;
if
(
condition
==
Condition
.
Watch
&&
Config
.
Get
(
"WatchPlayerMessage"
,
"1"
)
==
"0"
)
return
false
;
if
(
condition
==
Condition
.
Replay
&&
Config
.
Get
(
"ReplayPlayerMessage"
,
"1"
)
==
"0"
)
return
false
;
}
else
{
if
(
condition
==
Condition
.
Duel
&&
Config
.
Get
(
"DuelSystemMessage"
,
"1"
)
==
"0"
)
return
false
;
if
(
condition
==
Condition
.
Watch
&&
Config
.
Get
(
"WatchSystemMessage"
,
"1"
)
==
"0"
)
return
false
;
if
(
condition
==
Condition
.
Replay
&&
Config
.
Get
(
"ReplaySystemMessage"
,
"1"
)
==
"0"
)
return
false
;
}
return
true
;
}
public
void
Chat
(
int
player
,
string
content
)
{
if
(!
GetMessageConfig
(
player
))
return
;
var
playerName
=
Program
.
I
().
room
.
GetPlayerName
(
player
);
if
(
player
==
7
||
player
<
4
)
MessageManager
.
Cast
(
playerName
+
": "
+
content
);
...
...
Assets/Scripts/MDPro3/Servants/Setting.cs
View file @
1391efa8
...
...
@@ -56,6 +56,7 @@ namespace MDPro3
public
Text
cardLanguageValue
;
public
Button
language
;
public
Text
languageValue
;
[
Header
(
"Duel"
)]
public
Button
duelAppearance
;
public
Text
duelAppearanceValue
;
...
...
@@ -81,6 +82,10 @@ namespace MDPro3
public
Text
duelCoinValue
;
public
Button
duelAutoInfo
;
public
Text
duelAutoInfoValue
;
public
Button
duelPlayerMessage
;
public
Text
duelPlayerMessageValue
;
public
Button
duelSystemMessage
;
public
Text
duelSystemMessageValue
;
public
Button
timing
;
public
Text
timingValue
;
...
...
@@ -109,6 +114,10 @@ namespace MDPro3
public
Text
watchCoinValue
;
public
Button
watchAutoInfo
;
public
Text
watchAutoInfoValue
;
public
Button
watchPlayerMessage
;
public
Text
watchPlayerMessageValue
;
public
Button
watchSystemMessage
;
public
Text
watchSystemMessageValue
;
[
Header
(
"Replay"
)]
public
Button
replayAppearance
;
...
...
@@ -135,6 +144,11 @@ namespace MDPro3
public
Text
replayCoinValue
;
public
Button
replayAutoInfo
;
public
Text
replayAutoInfoValue
;
public
Button
replayPlayerMessage
;
public
Text
replayPlayerMessageValue
;
public
Button
replaySystemMessage
;
public
Text
replaySystemMessageValue
;
[
Header
(
"Port"
)]
public
Button
import
;
public
Button
exportDeck
;
...
...
@@ -158,7 +172,6 @@ namespace MDPro3
returnServant
=
Program
.
I
().
menu
;
base
.
Initialize
();
QualitySettings
.
vSyncCount
=
0
;
Application
.
targetFrameRate
=
60
;
...
...
@@ -214,6 +227,12 @@ namespace MDPro3
duelCoin
.
onClick
.
AddListener
(
OnDuelCoinClick
);
watchCoin
.
onClick
.
AddListener
(
OnWatchCoinClick
);
replayCoin
.
onClick
.
AddListener
(
OnReplayCoinClick
);
duelPlayerMessage
.
onClick
.
AddListener
(
OnDuelPlayerMessageClick
);
watchPlayerMessage
.
onClick
.
AddListener
(
OnWatchPlayerMessageClick
);
replayPlayerMessage
.
onClick
.
AddListener
(
OnReplayPlayerMessageClick
);
duelSystemMessage
.
onClick
.
AddListener
(
OnDuelSystemMessageClick
);
watchSystemMessage
.
onClick
.
AddListener
(
OnWatchSystemMessageClick
);
replaySystemMessage
.
onClick
.
AddListener
(
OnReplaySystemMessageClick
);
duelAutoInfo
.
onClick
.
AddListener
(
OnDuelAutoInfoClick
);
watchAutoInfo
.
onClick
.
AddListener
(
OnWatchAutoInfoClick
);
replayAutoInfo
.
onClick
.
AddListener
(
OnReplayAutoInfoClick
);
...
...
@@ -328,6 +347,12 @@ namespace MDPro3
Config
.
Set
(
"DuelAutoInfo"
,
SaveBool
(
duelAutoInfoValue
.
text
));
Config
.
Set
(
"WatchAutoInfo"
,
SaveBool
(
watchAutoInfoValue
.
text
));
Config
.
Set
(
"ReplayAutoInfo"
,
SaveBool
(
replayAutoInfoValue
.
text
));
Config
.
Set
(
"DuelPlayerMessage"
,
SaveBool
(
duelPlayerMessageValue
.
text
));
Config
.
Set
(
"WatchPlayerMessage"
,
SaveBool
(
watchPlayerMessageValue
.
text
));
Config
.
Set
(
"ReplayPlayerMessage"
,
SaveBool
(
replayPlayerMessageValue
.
text
));
Config
.
Set
(
"DuelSystemMessage"
,
SaveBool
(
duelSystemMessageValue
.
text
));
Config
.
Set
(
"WatchSystemMessage"
,
SaveBool
(
watchSystemMessageValue
.
text
));
Config
.
Set
(
"ReplaySystemMessage"
,
SaveBool
(
replaySystemMessageValue
.
text
));
Config
.
Set
(
"Timing"
,
SaveBool
(
timingValue
.
text
));
Config
.
Set
(
"Expansions"
,
SaveBool
(
supportExpansionsValue
.
text
));
...
...
@@ -979,6 +1004,38 @@ namespace MDPro3
else
replayAutoInfoValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"DuelPlayerMessage"
,
"1"
);
if
(
value
==
"0"
)
duelPlayerMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
duelPlayerMessageValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"WatchPlayerMessage"
,
"1"
);
if
(
value
==
"0"
)
watchPlayerMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
watchPlayerMessageValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"ReplayPlayerMessage"
,
"1"
);
if
(
value
==
"0"
)
replayPlayerMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
replayPlayerMessageValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"DuelSystemMessage"
,
"1"
);
if
(
value
==
"0"
)
duelSystemMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
duelSystemMessageValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"WatchSystemMessage"
,
"1"
);
if
(
value
==
"0"
)
watchSystemMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
watchSystemMessageValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"ReplaySystemMessage"
,
"1"
);
if
(
value
==
"0"
)
replaySystemMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
replaySystemMessageValue
.
text
=
InterString
.
Get
(
"开"
);
value
=
Config
.
Get
(
"Timing"
,
"0"
);
if
(
value
==
"0"
)
timingValue
.
text
=
InterString
.
Get
(
"关"
);
...
...
@@ -1246,6 +1303,7 @@ namespace MDPro3
else
replayCoinValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnDuelAutoInfoClick
()
{
if
(
duelAutoInfoValue
.
text
==
InterString
.
Get
(
"开"
))
...
...
@@ -1267,6 +1325,51 @@ namespace MDPro3
else
replayAutoInfoValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnDuelPlayerMessageClick
()
{
if
(
duelPlayerMessageValue
.
text
==
InterString
.
Get
(
"开"
))
duelPlayerMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
duelPlayerMessageValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnWatchPlayerMessageClick
()
{
if
(
watchPlayerMessageValue
.
text
==
InterString
.
Get
(
"开"
))
watchPlayerMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
watchPlayerMessageValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnReplayPlayerMessageClick
()
{
if
(
replayPlayerMessageValue
.
text
==
InterString
.
Get
(
"开"
))
replayPlayerMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
replayPlayerMessageValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnDuelSystemMessageClick
()
{
if
(
duelSystemMessageValue
.
text
==
InterString
.
Get
(
"开"
))
duelSystemMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
duelSystemMessageValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnWatchSystemMessageClick
()
{
if
(
watchSystemMessageValue
.
text
==
InterString
.
Get
(
"开"
))
watchSystemMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
watchSystemMessageValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnReplaySystemMessageClick
()
{
if
(
replaySystemMessageValue
.
text
==
InterString
.
Get
(
"开"
))
replaySystemMessageValue
.
text
=
InterString
.
Get
(
"关"
);
else
replaySystemMessageValue
.
text
=
InterString
.
Get
(
"开"
);
}
public
void
OnTimingClick
()
{
if
(
timingValue
.
text
==
InterString
.
Get
(
"开"
))
...
...
Data/locales/zh-CN/translation.conf
View file @
1391efa8
...
...
@@ -539,3 +539,11 @@ Off->Off
查看更新内容->查看更新内容
检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。
攻击被无效->攻击被无效
玩家消息->玩家消息
决斗中的玩家消息->决斗中的玩家消息
系统消息->系统消息
决斗中的系统消息->决斗中的系统消息
观战中的玩家消息->观战中的玩家消息
观战中的系统消息->观战中的系统消息
回放中的玩家消息->回放中的玩家消息
回放中的系统消息->回放中的系统消息
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