|
@@ -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) {
|