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
892fb37f
Commit
892fb37f
authored
May 09, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix focus
parent
4d7d9493
Pipeline
#21574
passed with stages
in 23 minutes and 32 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
src/service/duel/move.ts
src/service/duel/move.ts
+6
-6
src/service/duel/reloadField.ts
src/service/duel/reloadField.ts
+1
-0
src/service/duel/start.ts
src/service/duel/start.ts
+3
-0
src/stores/matStore/store.ts
src/stores/matStore/store.ts
+3
-2
src/stores/matStore/types.ts
src/stores/matStore/types.ts
+1
-1
No files found.
src/service/duel/move.ts
View file @
892fb37f
...
...
@@ -109,12 +109,12 @@ export default (move: MsgMove) => {
true
);
setTimeout
(
()
=>
(
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
)[
to
.
sequence
].
focus
=
false
),
200
);
setTimeout
(
()
=>
{
// 因为手牌可能会洗牌,sequence就对不上了,所以这里把所有手牌的focus字段都设置成false
for
(
const
hand
of
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
))
{
hand
.
focus
=
false
;
}
},
200
);
}
break
;
}
...
...
src/service/duel/reloadField.ts
View file @
892fb37f
...
...
@@ -50,6 +50,7 @@ function reloadDuelField(
},
idleInteractivities
:
[],
counters
:
{},
focus
:
false
,
reload
:
true
,
};
});
...
...
src/service/duel/start.ts
View file @
892fb37f
...
...
@@ -39,6 +39,7 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
controler
:
1
-
opponent
,
zone
:
ygopro
.
CardZone
.
DECK
,
},
focus
:
false
,
counters
:
{},
idleInteractivities
:
[],
});
...
...
@@ -55,6 +56,7 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
controler
:
opponent
,
zone
:
ygopro
.
CardZone
.
DECK
,
},
focus
:
false
,
counters
:
{},
idleInteractivities
:
[],
});
...
...
@@ -72,6 +74,7 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
controler
:
opponent
,
zone
:
ygopro
.
CardZone
.
EXTRA
,
},
focus
:
false
,
counters
:
{},
idleInteractivities
:
[],
});
...
...
src/stores/matStore/store.ts
View file @
892fb37f
...
...
@@ -40,7 +40,7 @@ class CardArray extends Array<CardState> implements ArrayCardState {
position
:
position
==
undefined
?
ygopro
.
CardPosition
.
FACEUP_ATTACK
:
position
,
},
focus
,
focus
:
focus
??
false
,
counters
:
{},
idleInteractivities
:
[],
});
...
...
@@ -84,7 +84,7 @@ class CardArray extends Array<CardState> implements ArrayCardState {
)
{
const
meta
=
await
fetchCard
(
id
);
const
target
=
this
[
sequence
];
target
.
focus
=
focus
;
target
.
focus
=
focus
??
false
;
target
.
occupant
=
meta
;
if
(
position
)
{
target
.
location
.
position
=
position
;
...
...
@@ -160,6 +160,7 @@ const genBlock = (zone: ygopro.CardZone, n: number) =>
location
:
{
zone
,
},
focus
:
false
,
idleInteractivities
:
[],
counters
:
{},
}));
...
...
src/stores/matStore/types.ts
View file @
892fb37f
...
...
@@ -120,7 +120,7 @@ export interface CardState {
zone
:
ygopro
.
CardZone
;
// 怪兽区/魔法陷阱区/手牌/卡组/墓地/除外区
position
?:
ygopro
.
CardPosition
;
// 卡片的姿势:攻击还是守备
};
// 位置信息,叫location的原因是为了和ygo对齐
focus
?
:
boolean
;
// 用于实现动画效果,当这个字段为true时,该张卡片会被放大并在屏幕中央展示
focus
:
boolean
;
// 用于实现动画效果,当这个字段为true时,该张卡片会被放大并在屏幕中央展示
idleInteractivities
:
Interactivity
<
number
>
[];
// IDLE状态下的互动信息
placeInteractivity
?:
Interactivity
<
{
controler
:
number
;
...
...
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