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) {