Browse Source

日常开发

林旭祥 2 weeks ago
parent
commit
47543f8c29
1 changed files with 2 additions and 9 deletions
  1. 2 9
      src/views/game/components/football.vue

+ 2 - 9
src/views/game/components/football.vue

@@ -153,11 +153,6 @@ const initGame = () => {
         emit('confirmExit', { type: 2, area: props.currentGameArea });
       }
   });
-  setTimeout(() => {
-    if (currentScene.value === 'start') {
-      startGame();
-    }
-  }, 1000)
 };
 
 // 预加载场景
@@ -318,6 +313,8 @@ class GameScene extends Phaser.Scene {
 
     // 等待开始游戏信号
     this.gameActive = false;
+    
+    startGame();
   }
 
   createBackground() {
@@ -1117,10 +1114,6 @@ const startGame = () => {
   }
 };
 
-const continueGame = () => {
-  startGame();
-};
-
 const restartGame = () => {
   // 1. 彻底销毁旧游戏实例
   if (game.value) {