Commit 71416980 authored by chechunchi's avatar chechunchi

add delay after chaining

parent b819730b
import { fetchCard, ygopro } from "@/api"; import { fetchCard, ygopro } from "@/api";
import { eventbus, Task } from "@/infra"; import { eventbus, sleep, Task } from "@/infra";
import { cardStore, fetchEsHintMeta, matStore } from "@/stores"; import { cardStore, fetchEsHintMeta, matStore } from "@/stores";
export default async (chaining: ygopro.StocGameMessage.MsgChaining) => { export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
...@@ -29,6 +29,10 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => { ...@@ -29,6 +29,10 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
// 发动效果动画 // 发动效果动画
await eventbus.call(Task.Focus, 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`);
// 临时办法,这里延迟500ms
// 长期:需要实现动画序列,一个动画完成后才执行下一个动画
await sleep(500);
} else { } else {
console.warn(`<Chaining>target from ${location} is null`); console.warn(`<Chaining>target from ${location} is null`);
} }
......
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