update: loading waiting

This commit is contained in:
math-pixel
2026-05-12 21:47:54 +02:00
parent 28c6ef199f
commit f9d7c3f00e
3 changed files with 13 additions and 5 deletions
+6 -1
View File
@@ -19,6 +19,7 @@ export function HomePage(): React.JSX.Element {
(state) => state.missionFlow.dialogMessage,
);
const hideDialog = useGameStore((state) => state.hideDialog);
const setSceneReady = useGameStore((state) => state.setSceneReady);
const [sceneLoadingState, setSceneLoadingState] = useState<SceneLoadingState>(
INITIAL_SCENE_LOADING_STATE,
);
@@ -42,13 +43,17 @@ export function HomePage(): React.JSX.Element {
return currentState;
}
if (nextState.status === "ready" && currentState.status !== "ready") {
setSceneReady(true);
}
return {
...nextState,
progress: Math.max(currentState.progress, nextState.progress),
};
});
},
[],
[setSceneReady],
);
return (