Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
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
love_飞影
Neos
Commits
75cc489c
Commit
75cc489c
authored
Aug 09, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix room
parent
dbaab022
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
src/service/duel/start.ts
src/service/duel/start.ts
+4
-3
src/ui/Duel/Message/EndModal/index.tsx
src/ui/Duel/Message/EndModal/index.tsx
+1
-1
src/ui/WaitRoom/Popover.tsx
src/ui/WaitRoom/Popover.tsx
+2
-1
No files found.
src/service/duel/start.ts
View file @
75cc489c
...
...
@@ -18,6 +18,10 @@ export default async (start: ygopro.StocGameMessage.MsgStart) => {
?
1
:
0
;
// 通知房间页面决斗开始
// 这行在该函数中的位置不能随便放,否则可能会block住
roomStore
.
stage
=
RoomStage
.
DUEL_START
;
matStore
.
initInfo
.
set
(
0
,
{
life
:
start
.
life1
,
deckSize
:
start
.
deckSize1
,
...
...
@@ -82,9 +86,6 @@ export default async (start: ygopro.StocGameMessage.MsgStart) => {
// 初始化完后,sleep 1s,让UI初始化完成,
// 否则在和AI对战时,由于后端给传给前端的`MSG`频率太高,会导致一些问题。
await
sleep
(
useConfig
().
startDelay
);
// 通知房间页面决斗开始
roomStore
.
stage
=
RoomStage
.
DUEL_START
;
};
// 自动从code推断出occupant
...
...
src/ui/Duel/Message/EndModal/index.tsx
View file @
75cc489c
...
...
@@ -29,7 +29,7 @@ export const EndModal: React.FC = () => {
const
onReturn
=
()
=>
{
resetUniverse
();
rs
();
navigate
(
"
/
home
"
);
navigate
(
"
/
match
"
);
};
return
(
...
...
src/ui/WaitRoom/Popover.tsx
View file @
75cc489c
...
...
@@ -23,7 +23,8 @@ export const MoraPopover: React.FC<
// 需要在mora的service之中,emit一个事件,让这个组件监听到,然后打开popover
useEffect
(()
=>
{
eventbus
.
once
(
Task
.
Mora
,
()
=>
{
// 这里不能用`once`,因为如果双方猜拳结果一样的话会重新猜拳
eventbus
.
on
(
Task
.
Mora
,
()
=>
{
setOpen
(
true
);
});
},
[]);
...
...
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