woso_javan пре 1 недеља
родитељ
комит
5e51e38250

+ 11 - 11
assets/module_aliens/Prefabs/UI/Result/UI_BattleResult.prefab

@@ -123,8 +123,8 @@
     },
     "_lscale": {
       "__type__": "cc.Vec3",
-      "x": 800,
-      "y": 800,
+      "x": 360,
+      "y": 360,
       "z": 0
     },
     "_mobility": 0,
@@ -151,8 +151,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 0.95,
-      "height": 2
+      "width": 0.005555555555555556,
+      "height": 0.005555555555555556
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -283,10 +283,10 @@
     },
     "_alignFlags": 45,
     "_target": null,
-    "_left": 0,
-    "_right": 0,
-    "_top": 0,
-    "_bottom": 0,
+    "_left": 359,
+    "_right": 359,
+    "_top": 799,
+    "_bottom": 799,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -382,7 +382,7 @@
         "__id__": 105
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 121
@@ -3072,7 +3072,7 @@
         "__id__": 181
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
         "__id__": 203
@@ -5081,7 +5081,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 760,
+      "width": 720,
       "height": 1600
     },
     "_anchorPoint": {

+ 2 - 1
assets/module_aliens/Prefabs/UI/Result/UI_BattleResult_Impl.ts

@@ -86,7 +86,8 @@ export class UI_BattleResult_Impl extends UI_BattleResult {
                 }
                 return;
             }
-            LevelManager.instance.restartLevelHandler();
+            // LevelManager.instance.restartLevelHandler();
+            EventDispatcher.instance.emit(GameEvent.EVENT_BATTLE_FAIL_LEVEL_RESET);
         }
     }
 

+ 15 - 7
assets/module_aliens/RoosterAliens.ts

@@ -69,6 +69,7 @@ export class RoosterAliens extends Component {
         EventDispatcher.instance.on(GameEvent.EVENT_GAME_ENTER, this.onStart, this);
         EventDispatcher.instance.on(GameEvent.EVENT_CAMERA_HIDE_AIM, this.onClickResetAim, this);
         EventDispatcher.instance.on(GameEvent.EVENT_GAME_BACK_HOME, this.backHome, this);
+        EventDispatcher.instance.on(GameEvent.EVENT_BATTLE_FAIL_LEVEL_RESET, this.onResetUI, this);
     }
 
     private onClickSet(): void {
@@ -81,19 +82,22 @@ export class RoosterAliens extends Component {
 
     private onClickAim(): void {
         AliensAudioMgr.playOneShot(AliensAudioMgr.getMusicIdName(3), 1.0);
-        const aimTarget = AliensGlobalInstance.instance.aimTarget;
-        const aimNode = AliensGlobalInstance.instance.aimNode;
-        aimTarget.active = true;
-        aimNode.active = false
+        this.onVisibleAim(true);
         EventDispatcher.instance.emit(GameEvent.EVENT_CAMERA_AIM);
     }
 
     private onClickResetAim(): void {
+        this.onVisibleAim(false);
+        EventDispatcher.instance.emit(GameEvent.EVENT_CAMERA_RESET_AIM);
+    }
+
+    private onVisibleAim(bool:boolean):void{
         const aimTarget = AliensGlobalInstance.instance.aimTarget;
         const aimNode = AliensGlobalInstance.instance.aimNode;
-        aimTarget.active = false;
-        aimNode.active = true;
-        EventDispatcher.instance.emit(GameEvent.EVENT_CAMERA_RESET_AIM);
+        aimTarget.active = bool;
+        aimNode.active = !bool;
+
+        console.log("onVisibleAim aimTarget.active:", aimTarget.active);
     }
 
     private frameTouchStart(event: EventTouch): void {
@@ -151,6 +155,10 @@ export class RoosterAliens extends Component {
         AliensGlobalInstance.instance.homeUI.active = true;
         AliensGlobalInstance.instance.battleUI.active = false;
     }
+
+    private onResetUI(): void {
+        this.onVisibleAim(false);
+    }
 }
 
 

+ 2 - 2
assets/module_aliens/Script/Enum/GameEvent.ts

@@ -64,8 +64,8 @@ export class GameEvent {
     /** 击中了怪物 外星人*/
     static readonly EVENT_CAMERA_SHOOT_ENEMY = 'EVENT_CAMERA_SHOOT_ENEMY';
 
-    /** 检测游戏是否结束*/
-    static readonly EVENT_CHECK_GAME_OVER = 'EVENT_CHECK_GAME_OVER';
+    /** 显示游戏结算*/
+    static readonly EVENT_SHOW_GAME_RESULT = 'EVENT_SHOW_GAME_RESULT';
 
     /** 闯关成功 关卡升级*/
     static readonly EVENT_BATTLE_SUCCESS_LEVEL_UP = 'EVENT_BATTLE_SUCCESS_LEVEL_UP';

+ 1 - 1
assets/module_aliens/Script/Manager/TimerMgr.ts

@@ -136,7 +136,7 @@ export class TimerMgr {
         this.countDownTime = LevelManager.instance.levelModel.levelTime;
 
         if (GlobalConfig.isDebug) {
-            this.countDownTime = 500;
+            this.countDownTime = 60;
         }
     }
 }

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

@@ -737,31 +737,6 @@
       },
       "scale": 0.2726269331663144
     },
-    "02aebe80-4488-4c7d-9cc6-5b71a0f5351d": {
-      "position": {
-        "x": 1.2255183030908325,
-        "y": 1.2255183030908872,
-        "z": 1.2255183030908547
-      },
-      "rotation": {
-        "x": -0.27984814233312133,
-        "y": 0.36470519963100073,
-        "z": 0.11591689595929508,
-        "w": 0.8804762392171495
-      },
-      "viewCenter": {
-        "x": 0,
-        "y": 0,
-        "z": 0
-      },
-      "contentRect": {
-        "x": -390.407285828671,
-        "y": 698.6355142985199,
-        "width": 0,
-        "height": 0
-      },
-      "scale": 0.2726269331663144
-    },
     "f631c866-c36b-443f-a8c0-a895176b7610": {
       "position": {
         "x": -6.70266155812694,
@@ -1037,31 +1012,6 @@
       },
       "scale": 1
     },
-    "d6678b55-2635-45df-bdce-51e04632740e": {
-      "position": {
-        "x": 420.9291746454538,
-        "y": 971.3994996442916,
-        "z": 5000
-      },
-      "rotation": {
-        "x": 0,
-        "y": 0,
-        "z": 0,
-        "w": 1
-      },
-      "viewCenter": {
-        "x": 0,
-        "y": 0,
-        "z": 0
-      },
-      "contentRect": {
-        "x": -181.5,
-        "y": -383.5,
-        "width": 0,
-        "height": 0
-      },
-      "scale": 1
-    },
     "7d719727-ff7f-4ee8-81ed-4ee61f407f45": {
       "position": {
         "x": 403.0748309475804,
@@ -1162,11 +1112,11 @@
       },
       "scale": 0.4026225829873136
     },
-    "4fac1625-c75a-4a5f-96e6-e15ddac448ae": {
+    "02aebe80-4488-4c7d-9cc6-5b71a0f5351d": {
       "position": {
-        "x": 385.32289248686857,
-        "y": 870.5882557138024,
-        "z": 1167.7075198966675
+        "x": -390.40728582867087,
+        "y": 698.63551429852,
+        "z": 5000
       },
       "rotation": {
         "x": 0,
@@ -1180,17 +1130,17 @@
         "z": 0
       },
       "contentRect": {
-        "x": -723.3113667716467,
-        "y": -722.1985800535366,
-        "width": 803,
-        "height": 803
+        "x": -2150.8631973753404,
+        "y": -755.7328982240887,
+        "width": 0,
+        "height": 0
       },
-      "scale": 0.4026225829873136
+      "scale": 0.2726269331663144
     },
-    "19323c5d-5d36-438a-86ee-8288c690e5b0": {
+    "b4b51e26-8df9-4c27-a300-00e08cb27bd6": {
       "position": {
-        "x": 39.73083333333332,
-        "y": 89.07583333333332,
+        "x": 141.22016975253314,
+        "y": 704.0749479005842,
         "z": 5000
       },
       "rotation": {
@@ -1205,17 +1155,17 @@
         "z": 0
       },
       "contentRect": {
-        "x": 172.5,
-        "y": 383.5,
-        "width": 335,
-        "height": 744.768115942029
+        "x": 141.22016975253308,
+        "y": 704.0749479005841,
+        "width": 0,
+        "height": 0
       },
-      "scale": 0.9710144927536232
+      "scale": 0.3535533905932737
     },
-    "9e293cde-e27b-4902-808b-e884f3e9da32": {
+    "4fac1625-c75a-4a5f-96e6-e15ddac448ae": {
       "position": {
-        "x": -1602.3049494866718,
-        "y": 661.4990149322742,
+        "x": 404.7065221296637,
+        "y": 575.6509961171319,
         "z": 5000
       },
       "rotation": {
@@ -1230,14 +1180,14 @@
         "z": 0
       },
       "contentRect": {
-        "x": -2133.9623620248913,
-        "y": -519.9619018193252,
-        "width": 356.85,
+        "x": -412.64479349694676,
+        "y": -99.58882533160083,
+        "width": 959.895392278954,
         "height": 793
       },
-      "scale": 0.33560145272529873
+      "scale": 0.5871987809446811
     },
-    "be14c61f-22d8-4bb9-b444-ad9f29740469": {
+    "d6678b55-2635-45df-bdce-51e04632740e": {
       "position": {
         "x": 486,
         "y": 401.5,
@@ -1262,10 +1212,10 @@
       },
       "scale": 0.9875466998754671
     },
-    "b4b51e26-8df9-4c27-a300-00e08cb27bd6": {
+    "19323c5d-5d36-438a-86ee-8288c690e5b0": {
       "position": {
-        "x": 513.9721808994366,
-        "y": 515.4496200647835,
+        "x": 69.74333333333333,
+        "y": 156.36333333333332,
         "z": 5000
       },
       "rotation": {
@@ -1280,12 +1230,62 @@
         "z": 0
       },
       "contentRect": {
-        "x": 513.9721808994366,
-        "y": 515.4496200647836,
-        "width": 0,
-        "height": 0
+        "x": 172.5,
+        "y": 383.5,
+        "width": 335,
+        "height": 744.768115942029
+      },
+      "scale": 0.9710144927536232
+    },
+    "9e293cde-e27b-4902-808b-e884f3e9da32": {
+      "position": {
+        "x": -1602.3049494866718,
+        "y": 661.4990149322742,
+        "z": 5000
+      },
+      "rotation": {
+        "x": 0,
+        "y": 0,
+        "z": 0,
+        "w": 1
+      },
+      "viewCenter": {
+        "x": 0,
+        "y": 0,
+        "z": 0
       },
-      "scale": 0.5946035575013605
+      "contentRect": {
+        "x": -2133.9623620248913,
+        "y": -519.9619018193252,
+        "width": 356.85,
+        "height": 793
+      },
+      "scale": 0.33560145272529873
+    },
+    "be14c61f-22d8-4bb9-b444-ad9f29740469": {
+      "position": {
+        "x": 1401.975,
+        "y": 401.49999999999994,
+        "z": 5000
+      },
+      "rotation": {
+        "x": 0,
+        "y": 0,
+        "z": 0,
+        "w": 1
+      },
+      "viewCenter": {
+        "x": 0,
+        "y": 0,
+        "z": 0
+      },
+      "contentRect": {
+        "x": 1221.3,
+        "y": 0,
+        "width": 959.895392278954,
+        "height": 793
+      },
+      "scale": 0.9875466998754671
     }
   },
   "camera-uuids": [
@@ -1317,7 +1317,6 @@
     "417b4aed-fd34-4100-83be-01eb628cd9f1",
     "ffb1e78b-9d51-4d1e-9cc0-83eb75b8ef80",
     "9b276317-137b-47c3-846f-5adaae548eff",
-    "02aebe80-4488-4c7d-9cc6-5b71a0f5351d",
     "f631c866-c36b-443f-a8c0-a895176b7610",
     "e4c2b613-d38f-42e1-9557-74a22acb2cdb",
     "7cef9a87-b169-4934-a57b-09eafc129e91",
@@ -1329,16 +1328,17 @@
     "ab9c7c8e-778f-48c3-b243-a2a97ca6bca7",
     "d6c70e36-45ba-48fa-813e-b4d0e71ff0db",
     "97847f67-f841-48ad-a6b2-6ac8db2fcbfd",
-    "d6678b55-2635-45df-bdce-51e04632740e",
     "7d719727-ff7f-4ee8-81ed-4ee61f407f45",
     "29dc5799-9f85-4365-b308-d63b7f8c6727",
     "55742b3c-e667-4650-8011-efdabf3e5d1b",
     "773de0b0-468b-4fbb-965c-36c47d7a4c94",
+    "02aebe80-4488-4c7d-9cc6-5b71a0f5351d",
+    "b4b51e26-8df9-4c27-a300-00e08cb27bd6",
     "4fac1625-c75a-4a5f-96e6-e15ddac448ae",
+    "d6678b55-2635-45df-bdce-51e04632740e",
     "19323c5d-5d36-438a-86ee-8288c690e5b0",
     "9e293cde-e27b-4902-808b-e884f3e9da32",
-    "be14c61f-22d8-4bb9-b444-ad9f29740469",
-    "b4b51e26-8df9-4c27-a300-00e08cb27bd6"
+    "be14c61f-22d8-4bb9-b444-ad9f29740469"
   ],
   "camera": {
     "color": [