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