Complete Course Design Project
This commit is contained in:
parent
7a1f715889
commit
d8122fe3d4
2
data.js
2
data.js
@ -340,7 +340,7 @@ const englishData = {
|
|||||||
"Here you are.",
|
"Here you are.",
|
||||||
"I don't have any ID.",
|
"I don't have any ID.",
|
||||||
"Why do you need that?",
|
"Why do you need that?",
|
||||||
"This is too麻烦."
|
"This is too troublesome."
|
||||||
],
|
],
|
||||||
correctAnswer: 0,
|
correctAnswer: 0,
|
||||||
type: "user_question"
|
type: "user_question"
|
||||||
|
|||||||
@ -36,7 +36,6 @@ function getDomElements() {
|
|||||||
function initGame() {
|
function initGame() {
|
||||||
resetGameState();
|
resetGameState();
|
||||||
loadScene(gameState.currentSceneIndex);
|
loadScene(gameState.currentSceneIndex);
|
||||||
setupEventListeners();
|
|
||||||
updateProgress();
|
updateProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,6 +388,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
// 获取DOM元素
|
// 获取DOM元素
|
||||||
getDomElements();
|
getDomElements();
|
||||||
|
|
||||||
|
// 设置事件监听器(只调用一次)
|
||||||
|
setupEventListeners();
|
||||||
|
|
||||||
// 确保englishData已加载
|
// 确保englishData已加载
|
||||||
if (typeof englishData !== 'undefined') {
|
if (typeof englishData !== 'undefined') {
|
||||||
initGame();
|
initGame();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user