Commit 013bee79 authored by timel's avatar timel

fix: rename chaining -> focus

parent 98e649ad
Pipeline #22052 passed with stages
in 14 minutes and 36 seconds
......@@ -5,7 +5,7 @@ const eventEmitter = new EventEmitter();
export enum Task {
Move = "move",
Chaining = "chaining",
Focus = "focus",
}
const getEnd = (task: Task) => `${task}-end`;
......
......@@ -22,7 +22,7 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
const target = cardStore.find(location);
if (target) {
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`);
} else {
console.warn(`<Chaining>target from ${location} is null`);
......
......@@ -12,7 +12,7 @@ import { cardStore, CardType, messageStore } from "@/stores";
import { interactTypeToString } from "../../utils";
import {
chaining,
focus,
moveToDeck,
moveToGround,
moveToHand,
......@@ -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) {
await addToAnimation(() => chaining({ card: state, api }));
await addToAnimation(() => focus({ card: state, api }));
}
});
// <<< 动画 <<<
......
......@@ -8,7 +8,7 @@ import { SpringApi } from "./types";
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 current = api.current[0].get();
if (card.zone === ygopro.CardZone.HAND) {
......
export * from "./chaining";
export * from "./focus";
export * from "./moveToDeck";
export * from "./moveToGround";
export * from "./moveToHand";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment