"use client"; // 回响星核 / Echo Nexus — 顶栏资源栏 import { useGameStore } from "@/store/gameStore"; import { formatNum, PRESTIGE } from "@/lib/game/config"; import { Gem, Lightbulb, Waves, RotateCcw } from "lucide-react"; import { Progress } from "@/components/ui/progress"; export function ResourceBar({ onPrestige }: { onPrestige: () => void }) { const crystals = useGameStore((s) => s.crystals); const crystalsPerSec = useGameStore((s) => s.crystalsPerSec); const insights = useGameStore((s) => s.insights); const contact = useGameStore((s) => s.contact); const ascensions = useGameStore((s) => s.ascensions); const blueprints = useGameStore((s) => s.blueprints); return (
{/* 晶体 */} } label="记忆晶体" value={formatNum(crystals)} sub={`+${crystalsPerSec.toFixed(1)}/s`} glow="rgba(52,211,153,0.4)" />
{/* 洞见 */} } label="技术洞见" value={formatNum(insights)} sub="解码产出" glow="rgba(251,191,36,0.4)" />
{/* 接触进度 */}
接触进度 {contact.toFixed(1)}% {contact >= 100 && ( )}
{/* 飞升 */}
飞升
{ascensions} ×{blueprints.length}
); } function Stat({ icon, label, value, sub, glow, }: { icon: React.ReactNode; label: string; value: string; sub: string; glow: string; }) { return (
{icon}
{label}
{value} {sub}
); }