From d8122fe3d40ffbd244d0beb091ba52b0261278d5 Mon Sep 17 00:00:00 2001 From: Student Date: Fri, 9 Jan 2026 01:01:23 +0800 Subject: [PATCH] Complete Course Design Project --- data.js | 2 +- script.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data.js b/data.js index c130ab1..40270a8 100644 --- a/data.js +++ b/data.js @@ -340,7 +340,7 @@ const englishData = { "Here you are.", "I don't have any ID.", "Why do you need that?", - "This is too麻烦." + "This is too troublesome." ], correctAnswer: 0, type: "user_question" diff --git a/script.js b/script.js index a22ae0b..c307274 100644 --- a/script.js +++ b/script.js @@ -36,7 +36,6 @@ function getDomElements() { function initGame() { resetGameState(); loadScene(gameState.currentSceneIndex); - setupEventListeners(); updateProgress(); } @@ -389,6 +388,9 @@ document.addEventListener('DOMContentLoaded', () => { // 获取DOM元素 getDomElements(); + // 设置事件监听器(只调用一次) + setupEventListeners(); + // 确保englishData已加载 if (typeof englishData !== 'undefined') { initGame();