Commit d7656ed2 authored by timel's avatar timel

fix: 动画的细微调整

parent b1e82d94
......@@ -22,6 +22,6 @@ declare global {
color: (
color: string,
backgroundColor?: string
) => (...args: any[]) => void;
) => (...args: Parameters<console.log>) => void;
}
}
......@@ -160,12 +160,7 @@ export default async (move: MsgMove) => {
await eventbus.call(Task.Move, target.uuid);
// 如果from或者to是手卡,那么需要刷新除了这张卡之外,这个玩家的所有手卡
if ([from.zone, to.zone].includes(HAND)) {
// for (const card of cardStore.at(HAND, target.location.controller)) {
// if (card.uuid !== target.uuid) {
// await eventbus.call(Task.Move, card.uuid);
// }
// }
Promise.all(
await Promise.all(
cardStore
.at(HAND, target.location.controller)
.filter((c) => c.uuid !== target.uuid)
......
......@@ -17,7 +17,12 @@ export const focus = async (props: { card: CardType; api: SpringApi }) => {
ry: 0,
rz: 0,
});
await asyncStart(api)({ y: current.y, ry: current.ry, rz: current.rz });
await asyncStart(api)({
y: current.y,
ry: current.ry,
rz: current.rz,
z: current.z,
});
} else {
await asyncStart(api)({
focusScale: 1.5,
......
......@@ -49,8 +49,7 @@ export const moveToHand = async (props: { card: CardType; api: SpringApi }) => {
const _rz = (angle * 180) / Math.PI;
// FIXME: 这里加上await会导致有些手卡会卡住不动,为什么呢?
asyncStart(api)({
await asyncStart(api)({
x: isMe(controller) ? x : -x,
y: isMe(controller) ? y : -y,
z: 15,
......
......@@ -65,7 +65,7 @@ export const matConfig = {
unit: UNIT.PX,
},
HAND_CARD_HEIGHT: {
value: 140,
value: 110,
unit: UNIT.PX,
},
DECK_OFFSET_X: {
......
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