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
b819730b
Commit
b819730b
authored
Jun 08, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'animation/confirm_card' into 'main'
add animation for confirm_card See merge request
!217
parents
e8698018
2130f915
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
src/service/duel/confirmCards.ts
src/service/duel/confirmCards.ts
+6
-2
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+2
-0
src/ui/Duel/PlayMat/Card/springs/focus.ts
src/ui/Duel/PlayMat/Card/springs/focus.ts
+6
-2
No files found.
src/service/duel/confirmCards.ts
View file @
b819730b
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
eventbus
,
sleep
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
{
cardStore
}
from
"
@/stores
"
;
export
default
async
(
confirmCards
:
ygopro
.
StocGameMessage
.
MsgConfirmCards
)
=>
{
export
default
async
(
confirmCards
:
ygopro
.
StocGameMessage
.
MsgConfirmCards
)
=>
{
...
@@ -12,8 +13,11 @@ export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
...
@@ -12,8 +13,11 @@ export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
// 设置`occupant`
// 设置`occupant`
const
meta
=
await
fetchCard
(
card
.
code
);
const
meta
=
await
fetchCard
(
card
.
code
);
target
.
meta
=
meta
;
target
.
meta
=
meta
;
// 设置`position`,否则会横放
// 动画
target
.
location
.
position
=
ygopro
.
CardPosition
.
ATTACK
;
await
eventbus
.
call
(
Task
.
Focus
,
target
.
uuid
);
// 临时措施,延迟一会,让动画逐个展示
// 长期:需要实现动画序列,一个动画完成后才执行下一个动画
await
sleep
(
500
);
}
else
{
}
else
{
console
.
warn
(
`card of
${
card
}
is null`
);
console
.
warn
(
`card of
${
card
}
is null`
);
}
}
...
...
src/service/duel/gameMsg.ts
View file @
b819730b
import
{
ygopro
}
from
"
@/api
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
onAnnounce
from
"
./announce
"
;
import
onAnnounce
from
"
./announce
"
;
...
@@ -112,6 +113,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
...
@@ -112,6 +113,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
}
}
case
"
move
"
:
{
case
"
move
"
:
{
await
onMsgMove
(
msg
.
move
);
await
onMsgMove
(
msg
.
move
);
await
sleep
(
500
);
break
;
break
;
}
}
...
...
src/ui/Duel/PlayMat/Card/springs/focus.ts
View file @
b819730b
...
@@ -8,12 +8,16 @@ import { asyncStart } from "./utils";
...
@@ -8,12 +8,16 @@ import { asyncStart } from "./utils";
export
const
focus
=
async
(
props
:
{
card
:
CardType
;
api
:
SpringApi
})
=>
{
export
const
focus
=
async
(
props
:
{
card
:
CardType
;
api
:
SpringApi
})
=>
{
const
{
card
,
api
}
=
props
;
const
{
card
,
api
}
=
props
;
const
current
=
api
.
current
[
0
].
get
();
const
current
=
api
.
current
[
0
].
get
();
if
(
card
.
location
.
zone
===
ygopro
.
CardZone
.
HAND
)
{
if
(
card
.
location
.
zone
==
ygopro
.
CardZone
.
HAND
||
card
.
location
.
zone
==
ygopro
.
CardZone
.
DECK
)
{
await
asyncStart
(
api
)({
await
asyncStart
(
api
)({
y
:
current
.
y
+
(
matStore
.
isMe
(
card
.
location
.
controller
)
?
-
1
:
1
)
*
200
,
// TODO: 放到config之中
y
:
current
.
y
+
(
matStore
.
isMe
(
card
.
location
.
controller
)
?
-
1
:
1
)
*
200
,
// TODO: 放到config之中
ry
:
0
,
rz
:
0
,
rz
:
0
,
});
});
await
asyncStart
(
api
)({
y
:
current
.
y
,
rz
:
current
.
rz
});
await
asyncStart
(
api
)({
y
:
current
.
y
,
r
y
:
current
.
ry
,
r
z
:
current
.
rz
});
}
else
{
}
else
{
await
asyncStart
(
api
)({
z
:
200
});
await
asyncStart
(
api
)({
z
:
200
});
await
asyncStart
(
api
)({
z
:
current
.
z
});
await
asyncStart
(
api
)({
z
:
current
.
z
});
...
...
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