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
1
Issues
1
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
MyCard
Neos
Commits
d65b0b86
Commit
d65b0b86
authored
Dec 24, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add phase ui
parent
da3d9236
Pipeline
#18793
passed with stages
in 3 minutes and 31 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
10 deletions
+20
-10
src/reducers/duel/hintSlice.ts
src/reducers/duel/hintSlice.ts
+0
-0
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+2
-2
src/reducers/duel/modalSlice.ts
src/reducers/duel/modalSlice.ts
+0
-0
src/service/duel/hint.ts
src/service/duel/hint.ts
+1
-1
src/service/duel/newPhase.ts
src/service/duel/newPhase.ts
+5
-1
src/ui/Duel/simpleDuel/cardModal.tsx
src/ui/Duel/simpleDuel/cardModal.tsx
+1
-1
src/ui/Duel/simpleDuel/hintNotification.tsx
src/ui/Duel/simpleDuel/hintNotification.tsx
+11
-1
src/ui/Duel/simpleDuel/mod.tsx
src/ui/Duel/simpleDuel/mod.tsx
+0
-4
No files found.
src/reducers/duel/hint.ts
→
src/reducers/duel/hint
Slice
.ts
View file @
d65b0b86
File moved
src/reducers/duel/mod.ts
View file @
d65b0b86
...
@@ -15,14 +15,14 @@ import {
...
@@ -15,14 +15,14 @@ import {
import
{
newTurnImpl
}
from
"
./turnSlice
"
;
import
{
newTurnImpl
}
from
"
./turnSlice
"
;
import
{
newPhaseImpl
}
from
"
./phaseSlice
"
;
import
{
newPhaseImpl
}
from
"
./phaseSlice
"
;
import
{
RootState
}
from
"
../../store
"
;
import
{
RootState
}
from
"
../../store
"
;
import
{
HintState
,
hintCase
}
from
"
./hint
"
;
import
{
HintState
,
hintCase
}
from
"
./hint
Slice
"
;
import
{
import
{
ModalState
,
ModalState
,
setCardModalIsOpenImpl
,
setCardModalIsOpenImpl
,
setCardModalTextImpl
,
setCardModalTextImpl
,
setCardModalImgUrlImpl
,
setCardModalImgUrlImpl
,
setCardModalInteractiviesImpl
,
setCardModalInteractiviesImpl
,
}
from
"
./modal
"
;
}
from
"
./modal
Slice
"
;
export
interface
DuelState
{
export
interface
DuelState
{
selfType
?:
number
;
selfType
?:
number
;
...
...
src/reducers/duel/modal.ts
→
src/reducers/duel/modal
Slice
.ts
View file @
d65b0b86
File moved
src/service/duel/hint.ts
View file @
d65b0b86
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
{
AppDispatch
}
from
"
../../store
"
;
import
{
AppDispatch
}
from
"
../../store
"
;
import
{
fetchHintMeta
}
from
"
../../reducers/duel/hint
"
;
import
{
fetchHintMeta
}
from
"
../../reducers/duel/hint
Slice
"
;
import
MsgHint
=
ygopro
.
StocGameMessage
.
MsgHint
;
import
MsgHint
=
ygopro
.
StocGameMessage
.
MsgHint
;
export
default
(
hint
:
MsgHint
,
dispatch
:
AppDispatch
)
=>
{
export
default
(
hint
:
MsgHint
,
dispatch
:
AppDispatch
)
=>
{
...
...
src/service/duel/newPhase.ts
View file @
d65b0b86
...
@@ -6,5 +6,9 @@ export default (
...
@@ -6,5 +6,9 @@ export default (
newPhase
:
ygopro
.
StocGameMessage
.
MsgNewPhase
,
newPhase
:
ygopro
.
StocGameMessage
.
MsgNewPhase
,
dispatch
:
AppDispatch
dispatch
:
AppDispatch
)
=>
{
)
=>
{
dispatch
(
updatePhase
(
newPhase
.
phase_type
.
toString
()));
dispatch
(
updatePhase
(
ygopro
.
StocGameMessage
.
MsgNewPhase
.
PhaseType
[
newPhase
.
phase_type
]
)
);
};
};
src/ui/Duel/simpleDuel/cardModal.tsx
View file @
d65b0b86
...
@@ -7,7 +7,7 @@ import {
...
@@ -7,7 +7,7 @@ import {
selectCardModalDesc
,
selectCardModalDesc
,
selectCardModalImgUrl
,
selectCardModalImgUrl
,
selectCardModalInteractivies
,
selectCardModalInteractivies
,
}
from
"
../../../reducers/duel/modal
"
;
}
from
"
../../../reducers/duel/modal
Slice
"
;
import
{
setCardModalIsOpen
}
from
"
../../../reducers/duel/mod
"
;
import
{
setCardModalIsOpen
}
from
"
../../../reducers/duel/mod
"
;
import
{
Modal
,
Card
,
Button
}
from
"
antd
"
;
import
{
Modal
,
Card
,
Button
}
from
"
antd
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
../../../api/ocgcore/ocgHelper
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
../../../api/ocgcore/ocgHelper
"
;
...
...
src/ui/Duel/simpleDuel/hintNotification.tsx
View file @
d65b0b86
import
React
,
{
useEffect
}
from
"
react
"
;
import
React
,
{
useEffect
}
from
"
react
"
;
import
{
useAppSelector
}
from
"
../../../hook
"
;
import
{
useAppSelector
}
from
"
../../../hook
"
;
import
{
selectMeHint
,
selectOpHint
}
from
"
../../../reducers/duel/hint
"
;
import
{
selectMeHint
,
selectOpHint
}
from
"
../../../reducers/duel/hintSlice
"
;
import
{
selectCurrentPhase
}
from
"
../../../reducers/duel/phaseSlice
"
;
import
{
notification
}
from
"
antd
"
;
import
{
notification
}
from
"
antd
"
;
const
HintNotification
=
()
=>
{
const
HintNotification
=
()
=>
{
const
meHint
=
useAppSelector
(
selectMeHint
);
const
meHint
=
useAppSelector
(
selectMeHint
);
const
opHint
=
useAppSelector
(
selectOpHint
);
const
opHint
=
useAppSelector
(
selectOpHint
);
const
currentPhase
=
useAppSelector
(
selectCurrentPhase
);
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -26,6 +28,14 @@ const HintNotification = () => {
...
@@ -26,6 +28,14 @@ const HintNotification = () => {
}
}
},
[
opHint
]);
},
[
opHint
]);
useEffect
(()
=>
{
if
(
currentPhase
)
{
api
.
info
({
message
:
`<当前阶段>
${
currentPhase
}
`
,
});
}
},
[
currentPhase
]);
return
<>
{
contextHolder
}
</>;
return
<>
{
contextHolder
}
</>;
};
};
...
...
src/ui/Duel/simpleDuel/mod.tsx
View file @
d65b0b86
...
@@ -19,7 +19,6 @@ import renderField from "./field";
...
@@ -19,7 +19,6 @@ import renderField from "./field";
import
*
as
CONFIG
from
"
../../../config/ui
"
;
import
*
as
CONFIG
from
"
../../../config/ui
"
;
import
{
Card
}
from
"
../../../reducers/duel/util
"
;
import
{
Card
}
from
"
../../../reducers/duel/util
"
;
import
{
selectCurrentPlayer
}
from
"
../../../reducers/duel/turnSlice
"
;
import
{
selectCurrentPlayer
}
from
"
../../../reducers/duel/turnSlice
"
;
import
{
selectCurrentPhase
}
from
"
../../../reducers/duel/phaseSlice
"
;
import
CardModal
from
"
./cardModal
"
;
import
CardModal
from
"
./cardModal
"
;
import
HintNotification
from
"
./hintNotification
"
;
import
HintNotification
from
"
./hintNotification
"
;
...
@@ -39,7 +38,6 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
...
@@ -39,7 +38,6 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
};
};
const
hands
=
useAppSelector
(
this
.
handsSelector
||
defaultHandsSelector
);
const
hands
=
useAppSelector
(
this
.
handsSelector
||
defaultHandsSelector
);
const
currentPlayer
=
useAppSelector
(
selectCurrentPlayer
);
const
currentPlayer
=
useAppSelector
(
selectCurrentPlayer
);
const
currentPhase
=
useAppSelector
(
selectCurrentPhase
);
// ----- WebGL渲染 -----
// ----- WebGL渲染 -----
const
canvasRef
=
useRef
<
HTMLCanvasElement
>
(
null
);
const
canvasRef
=
useRef
<
HTMLCanvasElement
>
(
null
);
...
@@ -111,8 +109,6 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
...
@@ -111,8 +109,6 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 当前操作玩家
// 当前操作玩家
console
.
log
(
`currentPlayer:`
+
currentPlayer
);
console
.
log
(
`currentPlayer:`
+
currentPlayer
);
// 当前阶段
console
.
log
(
`currentPhase:`
+
currentPhase
);
// 渲染循环
// 渲染循环
engine
.
runRenderLoop
(()
=>
{
engine
.
runRenderLoop
(()
=>
{
...
...
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