Commit 6cd81621 authored by timel's avatar timel

fix: small

parent d099cc09
......@@ -51,7 +51,7 @@ export const moveToHand: MoveFunc = async (props) => {
await asyncStart(api)({
x: isMe(controller) ? x : -x,
y: isMe(controller) ? y : -y,
z: sequence,
z: sequence + 5,
rz: isMe(controller) ? _rz : 180 - _rz,
ry: isMe(controller) ? 0 : 180,
height: HAND_CARD_HEIGHT.value,
......
......@@ -14,7 +14,7 @@ import { matStore, playerStore } from "@/stores";
// https://www.npmjs.com/package/react-countup?activeTab=dependents
export const LifeBar: React.FC = () => {
const snap = useSnapshot(matStore.initInfo);
const snapInitInfo = useSnapshot(matStore.initInfo);
const snapPlayer = useSnapshot(playerStore);
const { currentPlayer } = useSnapshot(matStore);
......@@ -22,12 +22,12 @@ export const LifeBar: React.FC = () => {
const [opLife, setOpLife] = React.useState(0);
useEffect(() => {
setMeLife(snap.me.life);
}, [snap.me.life]);
setMeLife(snapInitInfo.me.life);
}, [snapInitInfo.me.life]);
useEffect(() => {
setOpLife(snap.op.life);
}, [snap.op.life]);
setOpLife(snapInitInfo.op.life);
}, [snapInitInfo.op.life]);
const snapTimeLimit = useSnapshot(matStore.timeLimits);
const [myTimeLimit, setMyTimeLimit] = useState(snapTimeLimit.me);
......@@ -105,7 +105,7 @@ const LifeBarItem: React.FC<{
<div className="timer-container">
<Progress
type="circle"
percent={(timeLimit / 240) * 100}
percent={Math.floor((timeLimit / 240) * 100)}
strokeWidth={20}
size={14}
/>
......
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