42773b7e-7147-4ad5-828d-da7fcf0290b8

This commit is contained in:
2026-06-23 13:52:13 +00:00
parent da18f32df2
commit f3d2e53e4f
16 changed files with 562 additions and 34 deletions
+45 -4
View File
@@ -12,6 +12,11 @@ import { SettingsDialog } from "@/components/game/SettingsDialog";
import { ExpeditionPanel } from "@/components/game/ExpeditionPanel";
import { AchievementsPanel } from "@/components/game/AchievementsPanel";
import { AchievementNotifier } from "@/components/game/AchievementNotifier";
import {
StarTideNotifier,
StarTideIndicator,
StarTideOverlay,
} from "@/components/game/StarTide";
import { useGameLoop } from "@/hooks/useGameLoop";
import { useAudioSync } from "@/hooks/useAudio";
import { useGameStore } from "@/store/gameStore";
@@ -30,6 +35,7 @@ import {
} from "lucide-react";
import { TECH_TREE, FRAGMENTS, formatNum } from "@/lib/game/config";
import { ACHIEVEMENTS } from "@/lib/game/achievements";
import { TIDE_EVENTS } from "@/lib/game/starTide";
export default function Page() {
useGameLoop();
@@ -47,6 +53,7 @@ export default function Page() {
const ownedAchievements = useGameStore((s) => s.achievements);
const crystals = useGameStore((s) => s.crystals);
const crystalCap = useGameStore((s) => s.crystalCap);
const activeTide = useGameStore((s) => s.activeTide);
const energy = useGameStore((s) => s.energy);
const hasActiveExpedition = useGameStore((s) => !!s.activeExpedition && !s.activeExpedition.finished);
@@ -88,12 +95,18 @@ export default function Page() {
if (warehouseFull) {
goal = "⚠ 仓库已满,产能浪费中!请解码晶体或升级仓库";
}
if (activeTide) {
const tm = TIDE_EVENTS[activeTide.type];
goal = `${tm.icon} 星潮「${tm.name}」进行中 · ${tm.desc}`;
}
if (canPrestige) goal = "✦ 接触进度已满,可发起飞升进入新周目";
return (
<div className="relative min-h-screen flex flex-col bg-[#050410] text-foreground overflow-x-hidden">
{/* 星空背景 */}
<StarfieldCanvas className="fixed inset-0 w-full h-full -z-10" />
{/* 星潮背景叠层 */}
<StarTideOverlay />
{/* 顶部 Header */}
<header className="sticky top-0 z-30 px-3 sm:px-5 pt-3 pb-2">
@@ -108,11 +121,12 @@ export default function Page() {
<div className="leading-tight">
<h1 className="text-base sm:text-lg font-bold text-gradient"></h1>
<p className="text-[9px] sm:text-[10px] text-muted-foreground/70 -mt-0.5 tracking-wider">
ECHO NEXUS · v0.2.1
ECHO NEXUS · v0.3
</p>
</div>
</div>
<div className="ml-auto flex items-center gap-1.5">
<StarTideIndicator />
{canPrestige && (
<Button
size="sm"
@@ -212,9 +226,35 @@ export default function Page() {
{/* 底部 Footer */}
<footer className="sticky bottom-0 z-20 mt-auto px-3 sm:px-5 pb-2 pt-1">
<div className={`glass rounded-xl px-3 py-2 flex items-center gap-2 text-xs ${warehouseFull ? "border-amber-400/40 animate-pulse" : ""}`}>
<span className={warehouseFull ? "text-amber-400" : "text-fuchsia-300"}></span>
<span className={`flex-1 truncate ${warehouseFull ? "text-amber-200" : "text-muted-foreground"}`}>{goal}</span>
<div
className={`glass rounded-xl px-3 py-2 flex items-center gap-2 text-xs ${
warehouseFull ? "border-amber-400/40 animate-pulse" : ""
} ${activeTide ? "border-white/20" : ""}`}
style={
activeTide
? { boxShadow: `inset 0 0 16px ${TIDE_EVENTS[activeTide.type].glow}` }
: undefined
}
>
<span
className={
warehouseFull
? "text-amber-400"
: activeTide
? ""
: "text-fuchsia-300"
}
style={activeTide ? { color: TIDE_EVENTS[activeTide.type].color } : undefined}
>
</span>
<span
className={`flex-1 truncate ${
warehouseFull ? "text-amber-200" : "text-muted-foreground"
}`}
>
{goal}
</span>
<span className="hidden sm:inline text-muted-foreground/60">|</span>
<span className="hidden sm:inline text-muted-foreground/70">
{formatNum(crystalsPerSec)}/s
@@ -234,6 +274,7 @@ export default function Page() {
<PrestigeDialog open={prestigeOpen} onOpenChange={setPrestigeOpen} />
<SettingsDialog open={settingsOpen} onOpenChange={setSettingsOpen} />
<AchievementNotifier />
<StarTideNotifier />
</div>
);
}