Browse Source

日常开发

林旭祥 2 weeks ago
parent
commit
c37f95fb2c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/views/game/components/basketball.vue

+ 8 - 0
src/views/game/components/basketball.vue

@@ -909,6 +909,14 @@ const initGame = async () => {
 
 // 再次游戏
 const getResumeGame = async () => {
+  gameState.gameOver = false;
+  gameState.started = false;
+  gameState.score = 0;
+  gameState.time = 60;
+  gameState.balls = [];
+  gameState.state = 'play';
+  gameState.click = false;
+  gameState.exitTimer = null;
   handleMouseDown();
   setTimeout(() => {
     handleMouseUp();