Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions client/src/components/FlappyBeasts/flappyBeasts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -833,17 +833,6 @@ const FlappyBirdMiniGame = forwardRef<FlappyBirdRefHandle, FlappyBirdProps>(({
className="land animated"
style={{ backgroundImage: `url(${gameAssets.land})` }}
/>

{/* Exit button */}
{onExitGame && (
<button
className="return-button"
onClick={onExitGame}
>
X
</button>
)}

{/* Debug button to show colliders in UI for testing purposes */}
{/* <button
className="debug-button"
Expand Down Expand Up @@ -912,6 +901,7 @@ const FlappyBirdMiniGame = forwardRef<FlappyBirdRefHandle, FlappyBirdProps>(({
selectedFood={selectedFood}
handlePlayAgain={handlePlayAgain}
restartIcon={Restart}
onExitGame={onExitGame}
/>

{/* Energy Toast */}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/FlappyBeasts/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
.flappy-bird-game .return-button {
position: absolute;
top: 10px;
right: 10px;
left: 10px;
background-color: rgba(0, 0, 0, 0.5);
color: var(--text-light);
border: none;
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ const Header: React.FC<HeaderProps> = ({ tamagotchiStats }) => {
<img src={monster} alt="Logo" />
</Link>

<div onClick={() => buttonSound()}>
{/* <div onClick={() => buttonSound()}>
<Countdown />
</div>
</div> */}

<div className="side-menu-container">
<button
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Tamagotchi/Actions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Actions = ({
const [buttonSound] = useSound(buttonClick, { volume: 0.6, preload: true });

return (
<div className={`actions mb-0 ${isLoading ? 'loading-aura' : ''}`}>
<div className={`actions mb-0 ${isActionDisabled ? 'aura' : ''}`}>
{
actionButtons.map(({ label, img, action, pictureKey }) => (
<Button
Expand Down
12 changes: 11 additions & 1 deletion client/src/components/ui/ModalGameOver/ModalGameOver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface GameOverModalProps {
selectedFood?: any;
handlePlayAgain: () => void;
restartIcon: string;
onExitGame: any;
}

const GameOverModal: React.FC<GameOverModalProps> = ({
Expand All @@ -18,12 +19,21 @@ const GameOverModal: React.FC<GameOverModalProps> = ({
collectedFood,
selectedFood,
handlePlayAgain,
restartIcon
restartIcon,
onExitGame
}) => {
if (currentScreen !== 'gameover') return null;

return (
<div className="game-result-container">
{onExitGame && (
<button
className="return-button"
onClick={onExitGame}
>
X
</button>
)}
<h2 className="game-result-title">Game over!</h2>

<p className="game-result-score">
Expand Down