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
c21a0cbe
Commit
c21a0cbe
authored
Mar 30, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add BgChain component
parent
89b0e9c9
Pipeline
#26157
failed with stages
in 8 minutes and 29 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletion
+13
-1
src/stores/placeStore.ts
src/stores/placeStore.ts
+2
-1
src/ui/Duel/PlayMat/Bg/Chain/index.module.scss
src/ui/Duel/PlayMat/Bg/Chain/index.module.scss
+0
-0
src/ui/Duel/PlayMat/Bg/Chain/index.tsx
src/ui/Duel/PlayMat/Bg/Chain/index.tsx
+3
-0
src/ui/Duel/PlayMat/Bg/index.tsx
src/ui/Duel/PlayMat/Bg/index.tsx
+8
-0
No files found.
src/stores/placeStore.ts
View file @
c21a0cbe
...
@@ -20,7 +20,8 @@ const { MZONE, SZONE, HAND, GRAVE, REMOVED, EXTRA } = ygopro.CardZone;
...
@@ -20,7 +20,8 @@ const { MZONE, SZONE, HAND, GRAVE, REMOVED, EXTRA } = ygopro.CardZone;
export
interface
BlockState
{
export
interface
BlockState
{
interactivity
?:
PlaceInteractivity
;
// 互动性
interactivity
?:
PlaceInteractivity
;
// 互动性
disabled
:
boolean
;
// 是否被禁用
disabled
:
boolean
;
// 是否被禁用
chainIndex
:
number
[];
// 当前位置上的连锁序号。YGOPRO和MASTER DUEL的连锁都是和位置绑定的,因此在`PlaceStore`中记录连锁状态。
chainIndex
:
number
[]
/* 当前位置上的连锁序号。
YGOPRO和MASTER DUEL的连锁都是和位置绑定的,因此在`PlaceStore`中记录连锁状态。*/
;
}
}
const
genPLaces
=
(
n
:
number
):
BlockState
[]
=>
const
genPLaces
=
(
n
:
number
):
BlockState
[]
=>
...
...
src/ui/Duel/PlayMat/Bg/Chain/index.module.scss
0 → 100644
View file @
c21a0cbe
src/ui/Duel/PlayMat/Bg/Chain/index.tsx
0 → 100644
View file @
c21a0cbe
export
const
BgChain
:
React
.
FC
<
{
chains
:
readonly
number
[]
}
>
=
({
chains
,
})
=>
<
div
></
div
>;
src/ui/Duel/PlayMat/Bg/index.tsx
View file @
c21a0cbe
...
@@ -10,19 +10,23 @@ import {
...
@@ -10,19 +10,23 @@ import {
placeStore
,
placeStore
,
}
from
"
@/stores
"
;
}
from
"
@/stores
"
;
import
{
BgChain
}
from
"
./Chain
"
;
import
styles
from
"
./index.module.scss
"
;
import
styles
from
"
./index.module.scss
"
;
// TODO: 展示连锁图标
const
BgBlock
:
React
.
FC
<
const
BgBlock
:
React
.
FC
<
React
.
HTMLProps
<
HTMLDivElement
>
&
{
React
.
HTMLProps
<
HTMLDivElement
>
&
{
disabled
?:
boolean
;
disabled
?:
boolean
;
highlight
?:
boolean
;
highlight
?:
boolean
;
glowing
?:
boolean
;
glowing
?:
boolean
;
chains
?:
readonly
number
[];
}
}
>
=
({
>
=
({
disabled
=
false
,
disabled
=
false
,
highlight
=
false
,
highlight
=
false
,
glowing
=
false
,
glowing
=
false
,
className
,
className
,
chains
,
...
rest
...
rest
})
=>
(
})
=>
(
<
div
<
div
...
@@ -34,6 +38,7 @@ const BgBlock: React.FC<
...
@@ -34,6 +38,7 @@ const BgBlock: React.FC<
>
>
{
<
DecoTriangles
/>
}
{
<
DecoTriangles
/>
}
{
<
DisabledCross
disabled=
{
disabled
}
/>
}
{
<
DisabledCross
disabled=
{
disabled
}
/>
}
{
<
BgChain
chains=
{
chains
??
[]
}
/>
}
</
div
>
</
div
>
);
);
...
@@ -53,6 +58,7 @@ const BgExtraRow: React.FC<{
...
@@ -53,6 +58,7 @@ const BgExtraRow: React.FC<{
}
}
}
}
disabled=
{
meSnap
[
i
].
disabled
||
opSnap
[
i
].
disabled
}
disabled=
{
meSnap
[
i
].
disabled
||
opSnap
[
i
].
disabled
}
highlight=
{
!!
meSnap
[
i
].
interactivity
||
!!
opSnap
[
i
].
interactivity
}
highlight=
{
!!
meSnap
[
i
].
interactivity
||
!!
opSnap
[
i
].
interactivity
}
chains=
{
meSnap
[
i
].
chainIndex
}
/>
/>
))
}
))
}
</
div
>
</
div
>
...
@@ -72,11 +78,13 @@ const BgRow: React.FC<{
...
@@ -72,11 +78,13 @@ const BgRow: React.FC<{
onClick=
{
()
=>
onBlockClick
(
snap
[
i
].
interactivity
)
}
onClick=
{
()
=>
onBlockClick
(
snap
[
i
].
interactivity
)
}
disabled=
{
snap
[
i
].
disabled
}
disabled=
{
snap
[
i
].
disabled
}
highlight=
{
!!
snap
[
i
].
interactivity
}
highlight=
{
!!
snap
[
i
].
interactivity
}
chains=
{
snap
[
i
].
chainIndex
}
/>
/>
))
}
))
}
</
div
>
</
div
>
);
);
// TODO: chain
const
BgOtherBlocks
:
React
.
FC
<
{
op
?:
boolean
}
>
=
({
op
})
=>
{
const
BgOtherBlocks
:
React
.
FC
<
{
op
?:
boolean
}
>
=
({
op
})
=>
{
useSnapshot
(
cardStore
);
useSnapshot
(
cardStore
);
const
meController
=
isMe
(
0
)
?
0
:
1
;
const
meController
=
isMe
(
0
)
?
0
:
1
;
...
...
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