diff --git a/src/components/game/GameCanvas.tsx b/src/components/game/GameCanvas.tsx index 5898b18..6f5c930 100644 --- a/src/components/game/GameCanvas.tsx +++ b/src/components/game/GameCanvas.tsx @@ -306,9 +306,9 @@ function GameCanvas({
☠️
-
${username} 전사!
+
${username} 전사!
상대의 색이 사라졌습니다!
-
지금이 기회! 빈 공간을 차지하세요!
+
빈 공간을 공략하세요!
`; @@ -1197,6 +1197,7 @@ function GameCanvas({ lives={lives} maxLives={2} isLifeDecreasing={isLifeDecreasing} + userColor={userColor} /> )} @@ -1208,6 +1209,7 @@ function GameCanvas({ lives={lives} maxLives={2} isLifeDecreasing={isLifeDecreasing} + userColor={userColor} /> )} diff --git a/src/components/game/LifeIndicator.tsx b/src/components/game/LifeIndicator.tsx index dad2dad..d3c7747 100644 --- a/src/components/game/LifeIndicator.tsx +++ b/src/components/game/LifeIndicator.tsx @@ -4,9 +4,15 @@ interface LifeIndicatorProps { lives: number; maxLives: number; isLifeDecreasing: boolean; + userColor?: string; // 사용자 색상 추가 } -const LifeIndicator: React.FC = ({ lives, maxLives, isLifeDecreasing }) => { +const LifeIndicator: React.FC = ({ + lives, + maxLives, + isLifeDecreasing, + userColor, +}) => { const heartRefs = useRef>([]); useEffect(() => { @@ -19,7 +25,7 @@ const LifeIndicator: React.FC = ({ lives, maxLives, isLifeDe [ { transform: 'scale(1)', opacity: 1 }, { transform: 'scale(1.5)', opacity: 0.8 }, - { transform: 'scale(0.5) rotate(10deg)', opacity: 0 } + { transform: 'scale(0.5) rotate(10deg)', opacity: 0 }, ], { duration: 800, easing: 'ease-out', fill: 'forwards' } ); @@ -28,44 +34,58 @@ const LifeIndicator: React.FC = ({ lives, maxLives, isLifeDe }, [lives, isLifeDecreasing]); return ( -
- {[...Array(maxLives)].map((_, i) => ( -
{ - if (heartRefs.current) heartRefs.current[i] = el; - }} - > - {i < lives ? ( - - - - ) : ( - - - - )} -
- ))} +
+ {/* 사용자 색상 표시 */} +
+ Color: +
+
+ + {/* 목숨 표시 */} +
+ Life: + + {[...Array(maxLives)].map((_, i) => ( +
{ + if (heartRefs.current) heartRefs.current[i] = el; + }} + > + {i < lives ? ( + + + + ) : ( + + + + )} +
+ ))} +
); }; -export default LifeIndicator; \ No newline at end of file +export default LifeIndicator; diff --git a/src/components/modal/DeathModal.tsx b/src/components/modal/DeathModal.tsx index 31c7a5c..42fdb96 100644 --- a/src/components/modal/DeathModal.tsx +++ b/src/components/modal/DeathModal.tsx @@ -24,29 +24,33 @@ const DeathModal: React.FC = ({ isOpen }) => { return (
-
☠️
-

- 당신은 탈락했습니다! -

-

- 모든 생명을 잃었습니다. -

-

- {isTransparent - ? '관전 모드로 전환되었습니다.' - : '전장이 마무리될 때까지 잠시만 기다려주세요.'} -

+ {isTransparent ? ( + '관전모드로 변경되었습니다' + ) : ( + ☠️ + )} +
+ {!isTransparent && ( + <> +

+ 당신은 탈락했습니다! +

+

+ 모든 생명을 잃었습니다. +

+

+ 전장이 마무리될 때까지 잠시만 기다려주세요. +

+ + )}
);