Commit 98e649ad authored by Chunchi Che's avatar Chunchi Che

remove focus

parent 335f73e0
Pipeline #22050 passed with stages
in 17 minutes and 18 seconds
import { fetchCard, ygopro } from "@/api";
import { sleep } from "@/infra";
import { cardStore } from "@/stores";
export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
......@@ -14,13 +13,6 @@ export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
target.meta = meta;
// 设置`position`,否则会横放
target.position = ygopro.CardPosition.ATTACK;
// 聚焦1s
target.focus = true;
await sleep(1000);
target.focus = false;
await sleep(200);
} else {
console.warn(`card of ${card} is null`);
}
......
......@@ -4,7 +4,7 @@ import { proxy } from "valtio";
import { subscribeKey } from "valtio/utils";
import { fetchCard, ygopro } from "@/api";
import { cardStore, CardType, playerStore, store } from "@/stores";
import { cardStore, CardType, store } from "@/stores";
const { matStore } = store;
const TOKEN_SIZE = 13; // 每人场上最多就只可能有13个token
......@@ -60,7 +60,6 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
isToken: !((i + 1) % 3),
overlayMaterials: [],
position: ygopro.CardPosition.FACEDOWN,
focus: false,
chaining: false,
directAttack: false,
})
......
......@@ -29,7 +29,6 @@ export interface CardType {
isToken: boolean; // 是否是token
// 新的字段(从matstore之中搬过来的)
focus: boolean; // 用于实现动画效果,当这个字段为true时,该张卡片会被放大并在屏幕中央展示
chaining: boolean; // 是否在连锁中
chainIndex?: number /*连锁的序号,如果为空表示不在连锁
TODO: 目前是妥协的设计,因为其实一张卡是可以在同一个连锁链中被连锁多次的,这里为了避免太过复杂只保存最后的连锁序号*/;
......
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