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
013bee79
Commit
013bee79
authored
Jun 01, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: rename chaining -> focus
parent
98e649ad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
src/infra/eventbus.ts
src/infra/eventbus.ts
+1
-1
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+1
-1
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+3
-3
src/ui/Duel/PlayMat/Card/springs/focus.ts
src/ui/Duel/PlayMat/Card/springs/focus.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/index.ts
src/ui/Duel/PlayMat/Card/springs/index.ts
+1
-1
No files found.
src/infra/eventbus.ts
View file @
013bee79
...
@@ -5,7 +5,7 @@ const eventEmitter = new EventEmitter();
...
@@ -5,7 +5,7 @@ const eventEmitter = new EventEmitter();
export
enum
Task
{
export
enum
Task
{
Move
=
"
move
"
,
Move
=
"
move
"
,
Chaining
=
"
chaining
"
,
Focus
=
"
focus
"
,
}
}
const
getEnd
=
(
task
:
Task
)
=>
`
${
task
}
-end`
;
const
getEnd
=
(
task
:
Task
)
=>
`
${
task
}
-end`
;
...
...
src/service/duel/chaining.ts
View file @
013bee79
...
@@ -22,7 +22,7 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
...
@@ -22,7 +22,7 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
const
target
=
cardStore
.
find
(
location
);
const
target
=
cardStore
.
find
(
location
);
if
(
target
)
{
if
(
target
)
{
target
.
chainIndex
=
matStore
.
chains
.
length
;
target
.
chainIndex
=
matStore
.
chains
.
length
;
await
eventbus
.
call
(
Task
.
Chaining
,
target
.
uuid
);
await
eventbus
.
call
(
Task
.
Focus
,
target
.
uuid
);
console
.
color
(
"
blue
"
)(
`
${
target
.
meta
.
text
.
name
}
chaining`
);
console
.
color
(
"
blue
"
)(
`
${
target
.
meta
.
text
.
name
}
chaining`
);
}
else
{
}
else
{
console
.
warn
(
`<Chaining>target from
${
location
}
is null`
);
console
.
warn
(
`<Chaining>target from
${
location
}
is null`
);
...
...
src/ui/Duel/PlayMat/Card/index.tsx
View file @
013bee79
...
@@ -12,7 +12,7 @@ import { cardStore, CardType, messageStore } from "@/stores";
...
@@ -12,7 +12,7 @@ import { cardStore, CardType, messageStore } from "@/stores";
import
{
interactTypeToString
}
from
"
../../utils
"
;
import
{
interactTypeToString
}
from
"
../../utils
"
;
import
{
import
{
chaining
,
focus
,
moveToDeck
,
moveToDeck
,
moveToGround
,
moveToGround
,
moveToHand
,
moveToHand
,
...
@@ -85,9 +85,9 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
...
@@ -85,9 +85,9 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
}
}
});
});
eventbus
.
register
(
Task
.
Chaining
,
async
(
uuid
:
string
)
=>
{
eventbus
.
register
(
Task
.
Focus
,
async
(
uuid
:
string
)
=>
{
if
(
uuid
===
state
.
uuid
)
{
if
(
uuid
===
state
.
uuid
)
{
await
addToAnimation
(()
=>
chaining
({
card
:
state
,
api
}));
await
addToAnimation
(()
=>
focus
({
card
:
state
,
api
}));
}
}
});
});
// <<< 动画 <<<
// <<< 动画 <<<
...
...
src/ui/Duel/PlayMat/Card/springs/
chaining
.ts
→
src/ui/Duel/PlayMat/Card/springs/
focus
.ts
View file @
013bee79
...
@@ -8,7 +8,7 @@ import { SpringApi } from "./types";
...
@@ -8,7 +8,7 @@ import { SpringApi } from "./types";
import
{
asyncStart
}
from
"
./utils
"
;
import
{
asyncStart
}
from
"
./utils
"
;
/** 发动效果的动画 */
/** 发动效果的动画 */
export
const
chaining
=
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
.
zone
===
ygopro
.
CardZone
.
HAND
)
{
if
(
card
.
zone
===
ygopro
.
CardZone
.
HAND
)
{
...
...
src/ui/Duel/PlayMat/Card/springs/index.ts
View file @
013bee79
export
*
from
"
./
chaining
"
;
export
*
from
"
./
focus
"
;
export
*
from
"
./moveToDeck
"
;
export
*
from
"
./moveToDeck
"
;
export
*
from
"
./moveToGround
"
;
export
*
from
"
./moveToGround
"
;
export
*
from
"
./moveToHand
"
;
export
*
from
"
./moveToHand
"
;
...
...
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