From 5ee52ec752ccc64583a01341d29dbd5d80df9019 Mon Sep 17 00:00:00 2001 From: math-pixel <59537610+math-pixel@users.noreply.github.com> Date: Thu, 14 May 2026 11:50:40 +0200 Subject: [PATCH] feat: video intro --- src/components/game/GameFlow.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/game/GameFlow.tsx b/src/components/game/GameFlow.tsx index 3db91f7..b3595ec 100644 --- a/src/components/game/GameFlow.tsx +++ b/src/components/game/GameFlow.tsx @@ -4,6 +4,7 @@ import { useGameStore } from "@/managers/stores/useGameStore"; export function GameFlow(): null { const step = useGameStore((state) => state.intro.currentStep); const setStep = useGameStore((state) => state.setIntroStep); + const playVideo = useGameStore((state) => state.playVideo); const isCinematicPlaying = useGameStore((state) => state.isCinematicPlaying); const sceneReady = useGameStore((state) => state.sceneReady); const setCanMove = useGameStore((state) => state.setCanMove); @@ -13,8 +14,9 @@ export function GameFlow(): null { if (!hasInitialized.current && step === "intro" && sceneReady) { hasInitialized.current = true; setStep("sequence_video"); + playVideo("/videos/intro.webm"); } - }, [step, setStep, sceneReady]); + }, [step, setStep, sceneReady, playVideo]); useEffect(() => { if (step === "sequence_video" && !isCinematicPlaying) {