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
98e649ad
Commit
98e649ad
authored
Jun 01, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove focus
parent
335f73e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
11 deletions
+1
-11
src/service/duel/confirmCards.ts
src/service/duel/confirmCards.ts
+0
-8
src/service/duel/start.ts
src/service/duel/start.ts
+1
-2
src/stores/cardStore.ts
src/stores/cardStore.ts
+0
-1
No files found.
src/service/duel/confirmCards.ts
View file @
98e649ad
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
{
cardStore
}
from
"
@/stores
"
;
export
default
async
(
confirmCards
:
ygopro
.
StocGameMessage
.
MsgConfirmCards
)
=>
{
export
default
async
(
confirmCards
:
ygopro
.
StocGameMessage
.
MsgConfirmCards
)
=>
{
...
@@ -14,13 +13,6 @@ export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
...
@@ -14,13 +13,6 @@ export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
target
.
meta
=
meta
;
target
.
meta
=
meta
;
// 设置`position`,否则会横放
// 设置`position`,否则会横放
target
.
position
=
ygopro
.
CardPosition
.
ATTACK
;
target
.
position
=
ygopro
.
CardPosition
.
ATTACK
;
// 聚焦1s
target
.
focus
=
true
;
await
sleep
(
1000
);
target
.
focus
=
false
;
await
sleep
(
200
);
}
else
{
}
else
{
console
.
warn
(
`card of
${
card
}
is null`
);
console
.
warn
(
`card of
${
card
}
is null`
);
}
}
...
...
src/service/duel/start.ts
View file @
98e649ad
...
@@ -4,7 +4,7 @@ import { proxy } from "valtio";
...
@@ -4,7 +4,7 @@ import { proxy } from "valtio";
import
{
subscribeKey
}
from
"
valtio/utils
"
;
import
{
subscribeKey
}
from
"
valtio/utils
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
CardType
,
playerStore
,
store
}
from
"
@/stores
"
;
import
{
cardStore
,
CardType
,
store
}
from
"
@/stores
"
;
const
{
matStore
}
=
store
;
const
{
matStore
}
=
store
;
const
TOKEN_SIZE
=
13
;
// 每人场上最多就只可能有13个token
const
TOKEN_SIZE
=
13
;
// 每人场上最多就只可能有13个token
...
@@ -60,7 +60,6 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
...
@@ -60,7 +60,6 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
isToken
:
!
((
i
+
1
)
%
3
),
isToken
:
!
((
i
+
1
)
%
3
),
overlayMaterials
:
[],
overlayMaterials
:
[],
position
:
ygopro
.
CardPosition
.
FACEDOWN
,
position
:
ygopro
.
CardPosition
.
FACEDOWN
,
focus
:
false
,
chaining
:
false
,
chaining
:
false
,
directAttack
:
false
,
directAttack
:
false
,
})
})
...
...
src/stores/cardStore.ts
View file @
98e649ad
...
@@ -29,7 +29,6 @@ export interface CardType {
...
@@ -29,7 +29,6 @@ export interface CardType {
isToken
:
boolean
;
// 是否是token
isToken
:
boolean
;
// 是否是token
// 新的字段(从matstore之中搬过来的)
// 新的字段(从matstore之中搬过来的)
focus
:
boolean
;
// 用于实现动画效果,当这个字段为true时,该张卡片会被放大并在屏幕中央展示
chaining
:
boolean
;
// 是否在连锁中
chaining
:
boolean
;
// 是否在连锁中
chainIndex
?:
number
/*连锁的序号,如果为空表示不在连锁
chainIndex
?:
number
/*连锁的序号,如果为空表示不在连锁
TODO: 目前是妥协的设计,因为其实一张卡是可以在同一个连锁链中被连锁多次的,这里为了避免太过复杂只保存最后的连锁序号*/
;
TODO: 目前是妥协的设计,因为其实一张卡是可以在同一个连锁链中被连锁多次的,这里为了避免太过复杂只保存最后的连锁序号*/
;
...
...
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