"use client"; import { useEditorStore } from "@/lib/store"; export function GameOverScreen() { const setIsPlaying = useEditorStore((s) => s.setIsPlaying); const setHealth = useEditorStore((s) => s.setHealth); const setShield = useEditorStore((s) => s.setShield); const maxHealth = useEditorStore((s) => s.maxHealth); const maxShield = useEditorStore((s) => s.maxShield); const handleRestart = () => { setHealth(maxHealth); setShield(maxShield); setIsPlaying(false); setTimeout(() => setIsPlaying(true), 100); }; const handleExit = () => { setHealth(maxHealth); setShield(maxShield); setIsPlaying(false); }; return (
You have been defeated