Commit 6cd81621 authored by timel's avatar timel

fix: small

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