feat: video intro
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user