fix : lint
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled

This commit is contained in:
math-pixel
2026-05-12 16:51:35 +02:00
parent 700c088c48
commit ceffedf684
8 changed files with 93 additions and 156 deletions
+1 -17
View File
@@ -11,22 +11,16 @@ export function GameFlow(): null {
const hasInitialized = useRef(false);
useEffect(() => {
console.log("[GameFlow] Current step:", step);
if (!hasInitialized.current && step === "intro") {
hasInitialized.current = true;
console.log("[GameFlow] Transition to start-intro");
setStep("start-intro");
}
}, [step, setStep]);
useEffect(() => {
console.log("[GameFlow] useEffect triggered, step:", step);
if (step === "start-intro") {
console.log("[GameFlow] Playing intro audio");
const audio = AudioManager.getInstance();
audio.playSoundWithCallback(AUDIO_PATHS.intro, 0.5, () => {
console.log("[GameFlow] Intro audio ended, transition to naming");
setStep("naming");
});
@@ -34,10 +28,8 @@ export function GameFlow(): null {
}
if (step === "bienvenue") {
console.log("[GameFlow] Playing bienvenue audio");
const audio = AudioManager.getInstance();
audio.playSoundWithCallback(AUDIO_PATHS.bienvenue, 0.5, () => {
console.log("[GameFlow] Bienvenue audio ended, enable movement");
setCanMove(true);
setStep("star-move");
});
@@ -46,30 +38,22 @@ export function GameFlow(): null {
}
if (step === "mission2") {
console.log("[GameFlow] mission2 - setting activityCity to false");
setActivityCity(false);
const audio = AudioManager.getInstance();
audio.playSound(AUDIO_PATHS.alertCentral, 0.5);
}
if (step === "searching") {
console.log("[GameFlow] Playing searching audio");
const audio = AudioManager.getInstance();
audio.playSoundWithCallback(AUDIO_PATHS.searching, 0.5, () => {
console.log("[GameFlow] searching audio ended");
});
return () => {};
audio.playSound(AUDIO_PATHS.searching, 0.5);
}
if (step === "helped") {
console.log("[GameFlow] Playing helped audio");
const audio = AudioManager.getInstance();
audio.playSound(AUDIO_PATHS.helped, 0.5);
}
if (step === "manipulation") {
console.log("[GameFlow] manipulation - blocking movement");
setCanMove(false);
}