Ver Fonte

fixed bug2

woso_javan há 3 semanas atrás
pai
commit
fe113833b0

+ 3 - 2
assets/module_aliens/Script/LevelAction.ts

@@ -157,7 +157,6 @@ export class LevelAction extends Component {
 
         // 执行射线检测
         const hasHit = PhysicsSystem.instance.raycast(ray, mask, maxDistance, queryTrigger);
-        LevelManager.instance.levelModel.shootCount++;
 
         if (hasHit) {
             const results = PhysicsSystem.instance.raycastResults;
@@ -187,7 +186,6 @@ export class LevelAction extends Component {
                         }, CAMERA_SPLIT_DURATION);
                     }
 
-                    EventDispatcher.instance.emit(GameEvent.EVENT_PLAY_GUN_ANIMATION);
                     hitEnemy = true; // 标记已击中敌人
                 };
 
@@ -203,6 +201,9 @@ export class LevelAction extends Component {
                 }
             }
         }
+
+        LevelManager.instance.levelModel.shootCount++;
+        EventDispatcher.instance.emit(GameEvent.EVENT_PLAY_GUN_ANIMATION);
     }
 
     //相机转向目标

+ 1 - 1
profiles/v2/packages/preview.json

@@ -5,7 +5,7 @@
   },
   "preview": {
     "current": {
-      "platform": "browser"
+      "platform": "gameView"
     }
   }
 }

+ 24 - 24
profiles/v2/packages/scene.json

@@ -5,7 +5,7 @@
     "__version__": "1.3.7"
   },
   "gizmos-infos": {
-    "is2D": false,
+    "is2D": true,
     "is3DIcon": false,
     "iconSize": 2,
     "gridVisible": true,
@@ -1214,15 +1214,15 @@
     },
     "19323c5d-5d36-438a-86ee-8288c690e5b0": {
       "position": {
-        "x": 31.35641749741183,
-        "y": 31.35641749741183,
-        "z": 31.356417497411826
+        "x": 72.50083333333332,
+        "y": 154.4408333333333,
+        "z": 5000
       },
       "rotation": {
-        "x": -0.27984814233312133,
-        "y": 0.3647051996310009,
-        "z": 0.11591689595929512,
-        "w": 0.8804762392171493
+        "x": 0,
+        "y": 0,
+        "z": 0,
+        "w": 1
       },
       "viewCenter": {
         "x": 0,
@@ -1230,18 +1230,18 @@
         "z": 0
       },
       "contentRect": {
-        "x": 0,
-        "y": 0,
-        "width": 363,
-        "height": 767
+        "x": 181.5,
+        "y": 383.49999999999994,
+        "width": 353,
+        "height": 745.8705234159779
       },
-      "scale": 1
+      "scale": 0.9724517906336089
     },
     "9e293cde-e27b-4902-808b-e884f3e9da32": {
       "position": {
-        "x": 18.695477141176585,
-        "y": 18.695477141176582,
-        "z": 18.69547714117658
+        "x": 181.5,
+        "y": 383.5,
+        "z": 5000
       },
       "rotation": {
         "x": 0,
@@ -1264,9 +1264,9 @@
     },
     "be14c61f-22d8-4bb9-b444-ad9f29740469": {
       "position": {
-        "x": 458.54077502013865,
-        "y": 861.4995920248934,
-        "z": 2413.828024959584
+        "x": 803.2112232030264,
+        "y": 414.66393442622945,
+        "z": 5000
       },
       "rotation": {
         "x": 0,
@@ -1280,12 +1280,12 @@
         "z": 0
       },
       "contentRect": {
-        "x": 0,
-        "y": 0,
-        "width": 363,
-        "height": 767
+        "x": 619.4224464060529,
+        "y": 26.327868852459016,
+        "width": 974.708592777086,
+        "height": 793
       },
-      "scale": 1
+      "scale": 0.9875466998754671
     }
   },
   "camera-uuids": [