wuyu 1 rok temu
rodzic
commit
7e27dfb578

+ 1 - 1
assets/Scene/homeScene.fire

@@ -3367,7 +3367,7 @@
       "__id__": 47
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 66

+ 5 - 2
assets/Script/GameAudio.js

@@ -25,8 +25,11 @@ cc.Class({
         //矩阵事件监听
         cc.game.on(GameEvent.EventType.GAME_CLEAR_COUNT, (count) => {
             let index = Math.min(count - 1, this.brokens.length - 1);
-            zy.playSound(this.brokens[index]);
-            this._playPopEffect(count);
+            if(index >= 0) {
+                zy.playSound(this.brokens[index]);
+                this._playPopEffect(count);
+            }
+           
         }, this);
 
         //过关

+ 1 - 1
library/imports/7d/7d5816bc-d4d1-4533-a6c3-7a4e3a7b86a8.json

@@ -3368,7 +3368,7 @@
       "__id__": 47
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 66

+ 5 - 2
library/imports/e7/e7bb68d2-cc57-4091-9dcd-13d514d2fb82.js

@@ -54,9 +54,12 @@ cc.Class({
 
     cc.game.on(GameEvent.EventType.GAME_CLEAR_COUNT, function (count) {
       var index = Math.min(count - 1, _this.brokens.length - 1);
-      zy.playSound(_this.brokens[index]);
 
-      _this._playPopEffect(count);
+      if (index >= 0) {
+        zy.playSound(_this.brokens[index]);
+
+        _this._playPopEffect(count);
+      }
     }, this); //过关
 
     cc.game.on(GameEvent.EventType.GAME_PASS_STAGE, function () {

Plik diff jest za duży
+ 1 - 1
library/imports/e7/e7bb68d2-cc57-4091-9dcd-13d514d2fb82.js.map


+ 7 - 7
library/uuid-to-mtime.json

@@ -764,11 +764,6 @@
     "meta": 1702910492212,
     "relativePath": "Texture/game/setting/dialog.png"
   },
-  "e7bb68d2-cc57-4091-9dcd-13d514d2fb82": {
-    "asset": 1702910008237,
-    "meta": 1702910226956,
-    "relativePath": "Script/GameAudio.js"
-  },
   "cfaba5f5-a806-4976-ad0a-9d3c8b1e10cb": {
     "asset": 1702910008345,
     "meta": 1702910228163,
@@ -1470,8 +1465,8 @@
     "relativePath": "Script/common/GameTool.js"
   },
   "7d5816bc-d4d1-4533-a6c3-7a4e3a7b86a8": {
-    "asset": 1702913881214,
-    "meta": 1702913881234,
+    "asset": 1702914100960,
+    "meta": 1702914100980,
     "relativePath": "Scene/homeScene.fire"
   },
   "0753c3b3-b19c-4d4e-8c61-78062a1079d7": {
@@ -1488,5 +1483,10 @@
     "asset": 1702913748351,
     "meta": 1702913750072,
     "relativePath": "Script/common/Common.js"
+  },
+  "e7bb68d2-cc57-4091-9dcd-13d514d2fb82": {
+    "asset": 1702914059498,
+    "meta": 1702914061937,
+    "relativePath": "Script/GameAudio.js"
   }
 }

+ 3 - 4
local/layout.editor.json

@@ -18,7 +18,7 @@
                 "children": [
                   "hierarchy"
                 ],
-                "height": 333.625,
+                "height": 536.5,
                 "type": "panel",
                 "width": 348.546875
               },
@@ -28,7 +28,7 @@
                   "assets",
                   "cloud-function"
                 ],
-                "height": 628.875,
+                "height": 426,
                 "type": "panel",
                 "width": 348.546875
               }
@@ -103,8 +103,7 @@
         "inspector",
         "cocos-services"
       ]
-    },
-    "window-1702912037542": {}
+    }
   },
   "panels": {
     "builder": {

+ 2 - 2
temp/BackupAssets/assets/Scene/homeScene.fire

@@ -195,7 +195,7 @@
       "array": [
         0,
         0,
-        456.3953877943992,
+        421.08830375170305,
         0,
         0,
         0,
@@ -2999,7 +2999,7 @@
         "__id__": 59
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 64

Plik diff jest za duży
+ 1 - 1
temp/quick-scripts/dst/__quick_compile__.js


Plik diff jest za duży
+ 6 - 3
temp/quick-scripts/dst/assets/Script/GameAudio.js


+ 5 - 2
temp/quick-scripts/src/assets/Script/GameAudio.js

@@ -54,9 +54,12 @@ cc.Class({
 
     cc.game.on(GameEvent.EventType.GAME_CLEAR_COUNT, function (count) {
       var index = Math.min(count - 1, _this.brokens.length - 1);
-      zy.playSound(_this.brokens[index]);
 
-      _this._playPopEffect(count);
+      if (index >= 0) {
+        zy.playSound(_this.brokens[index]);
+
+        _this._playPopEffect(count);
+      }
     }, this); //过关
 
     cc.game.on(GameEvent.EventType.GAME_PASS_STAGE, function () {

+ 0 - 1
temp/startup.json

@@ -1 +0,0 @@
-{"pid":6675}