Commit 1605f068 authored by Chunchi Che's avatar Chunchi Che

fix flip effect and remove effect on BuildDeck page

parent 57584ef1
Pipeline #27228 passed with stages
in 7 minutes and 41 seconds
...@@ -23,9 +23,10 @@ export default async (draw: ygopro.StocGameMessage.MsgDraw) => { ...@@ -23,9 +23,10 @@ export default async (draw: ygopro.StocGameMessage.MsgDraw) => {
card.meta = meta; card.meta = meta;
card.location.zone = ygopro.CardZone.HAND; card.location.zone = ygopro.CardZone.HAND;
card.location.sequence = Number(idx) + handsLength; card.location.sequence = Number(idx) + handsLength;
playEffect(AudioActionType.SOUND_DRAW);
} }
playEffect(AudioActionType.SOUND_DRAW);
// 抽卡动画 // 抽卡动画
await Promise.all( await Promise.all(
cardStore cardStore
......
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (_: ygopro.StocGameMessage.MsgFlipSummoned) => { export default (_: ygopro.StocGameMessage.MsgFlipSummoned) => {
playEffect(AudioActionType.SOUND_FILP);
fetchEsHintMeta({ originMsg: 1608 }); fetchEsHintMeta({ originMsg: 1608 });
}; };
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { AudioActionType, playEffect } from "@/infra/audio";
import { fetchEsHintMeta } from "@/stores"; import { fetchEsHintMeta } from "@/stores";
export default (flipSummoning: ygopro.StocGameMessage.MsgFlipSummoning) => { export default (flipSummoning: ygopro.StocGameMessage.MsgFlipSummoning) => {
playEffect(AudioActionType.SOUND_FILP);
fetchEsHintMeta({ fetchEsHintMeta({
originMsg: "「[?]」反转召唤宣言时", originMsg: "「[?]」反转召唤宣言时",
cardID: flipSummoning.code, cardID: flipSummoning.code,
......
...@@ -3,7 +3,6 @@ import { proxy } from "valtio"; ...@@ -3,7 +3,6 @@ import { proxy } from "valtio";
import { type CardMeta } from "@/api"; import { type CardMeta } from "@/api";
import { isExtraDeckCard, isToken } from "@/common"; import { isExtraDeckCard, isToken } from "@/common";
import { AudioActionType, playEffect } from "@/infra/audio";
import { Type } from "@/ui/Shared/DeckZone"; import { Type } from "@/ui/Shared/DeckZone";
import { compareCards, type EditingDeck } from "./utils"; import { compareCards, type EditingDeck } from "./utils";
...@@ -22,7 +21,6 @@ export const editDeckStore = proxy({ ...@@ -22,7 +21,6 @@ export const editDeckStore = proxy({
editDeckStore[type].push(card); editDeckStore[type].push(card);
editDeckStore[type].sort(compareCards); editDeckStore[type].sort(compareCards);
editDeckStore.edited = true; editDeckStore.edited = true;
playEffect(AudioActionType.SOUND_CARD_PICK);
}, },
remove(type: Type, card: CardMeta) { remove(type: Type, card: CardMeta) {
const index = editDeckStore[type].findIndex((item) => item.id === card.id); const index = editDeckStore[type].findIndex((item) => item.id === card.id);
...@@ -30,7 +28,6 @@ export const editDeckStore = proxy({ ...@@ -30,7 +28,6 @@ export const editDeckStore = proxy({
editDeckStore[type].splice(index, 1); editDeckStore[type].splice(index, 1);
editDeckStore.edited = true; editDeckStore.edited = true;
} }
playEffect(AudioActionType.SOUND_CARD_DROP);
}, },
set(deck: EditingDeck) { set(deck: EditingDeck) {
editDeckStore.deckName = deck.deckName; editDeckStore.deckName = deck.deckName;
......
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