浏览代码

Merge branch 'master' of http://120.92.132.192:23541/TDGame/TDGameClient3D

xiejing 4 年之前
父节点
当前提交
6a977a22e0

+ 137 - 93
assets/resources/ui/FightingUI.prefab

@@ -44,23 +44,23 @@
         "__id__": 181
       },
       {
-        "__id__": 210
+        "__id__": 209
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 234
-      },
       {
         "__id__": 235
       },
       {
         "__id__": 236
+      },
+      {
+        "__id__": 237
       }
     ],
     "_prefab": {
-      "__id__": 237
+      "__id__": 238
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5593,14 +5593,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 207
+        "__id__": 206
       },
       {
-        "__id__": 208
+        "__id__": 207
       }
     ],
     "_prefab": {
-      "__id__": 209
+      "__id__": 208
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6029,25 +6029,25 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 201
+        "__id__": 200
       },
       {
-        "__id__": 202
+        "__id__": 201
       },
       {
-        "__id__": 203
+        "__id__": 202
       },
       {
-        "__id__": 205
+        "__id__": 204
       }
     ],
     "_prefab": {
-      "__id__": 206
+      "__id__": 205
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -368,
-      "y": -4.5,
+      "y": -5,
       "z": 0
     },
     "_lrot": {
@@ -6087,13 +6087,10 @@
       },
       {
         "__id__": 198
-      },
-      {
-        "__id__": 199
       }
     ],
     "_prefab": {
-      "__id__": 200
+      "__id__": 199
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6134,7 +6131,7 @@
     "_priority": 0,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 126,
+      "width": 96,
       "height": 50.4
     },
     "_anchorPoint": {
@@ -6166,8 +6163,8 @@
     "_string": "更换栅栏",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 30,
-    "_fontSize": 30,
+    "_actualFontSize": 24,
+    "_fontSize": 24,
     "_fontFamily": "Arial",
     "_lineHeight": 40,
     "_overflow": 0,
@@ -6180,24 +6177,6 @@
     "_cacheMode": 0,
     "_id": ""
   },
-  {
-    "__type__": "cc.LabelOutlineComponent",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 196
-    },
-    "_enabled": true,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 241,
-      "g": 11,
-      "b": 11,
-      "a": 255
-    },
-    "_width": 3,
-    "_id": ""
-  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -6224,8 +6203,8 @@
     "_priority": 0,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 150,
-      "height": 100
+      "width": 130,
+      "height": 60
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -6280,7 +6259,7 @@
     "_enabled": true,
     "clickEvents": [
       {
-        "__id__": 204
+        "__id__": 203
       }
     ],
     "_interactable": true,
@@ -6353,7 +6332,7 @@
     "_left": 0,
     "_right": 0,
     "_top": 0,
-    "_bottom": -4.5,
+    "_bottom": 15,
     "_horizontalCenter": -368,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -6456,20 +6435,23 @@
     },
     "_children": [
       {
-        "__id__": 211
+        "__id__": 210
       },
       {
-        "__id__": 216
+        "__id__": 215
       },
       {
-        "__id__": 221
+        "__id__": 220
       },
       {
-        "__id__": 226
+        "__id__": 225
       }
     ],
     "_active": true,
     "_components": [
+      {
+        "__id__": 230
+      },
       {
         "__id__": 231
       },
@@ -6478,7 +6460,7 @@
       }
     ],
     "_prefab": {
-      "__id__": 233
+      "__id__": 234
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6513,23 +6495,23 @@
     "_name": "kongtou_guang",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 210
+      "__id__": 209
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 212
+        "__id__": 211
       },
       {
-        "__id__": 213
+        "__id__": 212
       },
       {
-        "__id__": 214
+        "__id__": 213
       }
     ],
     "_prefab": {
-      "__id__": 215
+      "__id__": 214
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6564,7 +6546,7 @@
     "_name": "kongtou<UITransformComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 211
+      "__id__": 210
     },
     "_enabled": true,
     "_priority": 0,
@@ -6585,7 +6567,7 @@
     "_name": "kongtou<SpriteComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 211
+      "__id__": 210
     },
     "_enabled": true,
     "_srcBlendFactor": 2,
@@ -6621,7 +6603,7 @@
     "_name": "Bow<AnimationComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 211
+      "__id__": 210
     },
     "_enabled": true,
     "playOnLoad": true,
@@ -6649,23 +6631,23 @@
     "_name": "kongtou_san",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 210
+      "__id__": 209
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 217
+        "__id__": 216
       },
       {
-        "__id__": 218
+        "__id__": 217
       },
       {
-        "__id__": 219
+        "__id__": 218
       }
     ],
     "_prefab": {
-      "__id__": 220
+      "__id__": 219
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6700,7 +6682,7 @@
     "_name": "kongtou<UITransformComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 216
+      "__id__": 215
     },
     "_enabled": true,
     "_priority": 0,
@@ -6721,7 +6703,7 @@
     "_name": "kongtou<SpriteComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 216
+      "__id__": 215
     },
     "_enabled": true,
     "_srcBlendFactor": 2,
@@ -6757,7 +6739,7 @@
     "_name": "Bow<AnimationComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 216
+      "__id__": 215
     },
     "_enabled": true,
     "playOnLoad": true,
@@ -6785,23 +6767,23 @@
     "_name": "kongtou_bao",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 210
+      "__id__": 209
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 222
+        "__id__": 221
       },
       {
-        "__id__": 223
+        "__id__": 222
       },
       {
-        "__id__": 224
+        "__id__": 223
       }
     ],
     "_prefab": {
-      "__id__": 225
+      "__id__": 224
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6836,7 +6818,7 @@
     "_name": "kongtou<UITransformComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 221
+      "__id__": 220
     },
     "_enabled": true,
     "_priority": 0,
@@ -6857,7 +6839,7 @@
     "_name": "kongtou<SpriteComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 221
+      "__id__": 220
     },
     "_enabled": true,
     "_srcBlendFactor": 2,
@@ -6893,7 +6875,7 @@
     "_name": "Bow<AnimationComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 221
+      "__id__": 220
     },
     "_enabled": true,
     "playOnLoad": true,
@@ -6921,28 +6903,28 @@
     "_name": "Label",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 210
+      "__id__": 209
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 227
+        "__id__": 226
       },
       {
-        "__id__": 228
+        "__id__": 227
       },
       {
-        "__id__": 229
+        "__id__": 228
       }
     ],
     "_prefab": {
-      "__id__": 230
+      "__id__": 229
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 2,
-      "y": -62,
+      "x": 5.296,
+      "y": -71.62,
       "z": 0
     },
     "_lrot": {
@@ -6972,13 +6954,13 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 226
+      "__id__": 225
     },
     "_enabled": true,
     "_priority": 0,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 150,
+      "width": 82,
       "height": 50.4
     },
     "_anchorPoint": {
@@ -6993,7 +6975,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 226
+      "__id__": 225
     },
     "_enabled": true,
     "_srcBlendFactor": 2,
@@ -7001,8 +6983,8 @@
     "_color": {
       "__type__": "cc.Color",
       "r": 255,
-      "g": 236,
-      "b": 97,
+      "g": 224,
+      "b": 0,
       "a": 255
     },
     "_sharedMaterial": null,
@@ -7010,8 +6992,8 @@
     "_string": "限时空投",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 36,
-    "_fontSize": 36,
+    "_actualFontSize": 20,
+    "_fontSize": 20,
     "_fontFamily": "Arial",
     "_lineHeight": 40,
     "_overflow": 0,
@@ -7029,17 +7011,17 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 226
+      "__id__": 225
     },
     "_enabled": true,
     "_color": {
       "__type__": "cc.Color",
       "r": 255,
-      "g": 0,
-      "b": 71,
+      "g": 92,
+      "b": 0,
       "a": 255
     },
-    "_width": 3,
+    "_width": 1,
     "_id": ""
   },
   {
@@ -7062,7 +7044,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 210
+      "__id__": 209
     },
     "_enabled": true,
     "_priority": 0,
@@ -7083,10 +7065,10 @@
     "_name": "Kongtou<AnimationComponent>",
     "_objFlags": 0,
     "node": {
-      "__id__": 210
+      "__id__": 209
     },
     "_enabled": true,
-    "playOnLoad": false,
+    "playOnLoad": true,
     "_clips": [
       {
         "__uuid__": "bf197d6d-1c07-41a8-97e0-4ac41bed08d2"
@@ -7097,6 +7079,68 @@
     },
     "_id": ""
   },
+  {
+    "__type__": "cc.ButtonComponent",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 209
+    },
+    "_enabled": true,
+    "clickEvents": [
+      {
+        "__id__": 233
+      }
+    ],
+    "_interactable": true,
+    "_transition": 0,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": null,
+    "_hoverSprite": null,
+    "_pressedSprite": null,
+    "_disabledSprite": null,
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "d0bdeKIPsdMkKRGOn+5AWII",
+    "handler": "pauseGame",
+    "customEventData": ""
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {

文件差异内容过多而无法显示
+ 240 - 266
assets/resources/ui/SignInUI.prefab


+ 11 - 0
assets/scripts/games/ui/fightings/FightingMediator.ts

@@ -479,6 +479,17 @@ export class FightingMediator extends GUIMediator {
         }
     }
 
+    /**
+     * 暂停游戏
+     */
+    pauseGame():void{
+        if(GameController.single.paused){
+            GameController.single.PlayGame();
+        }else{
+            GameController.single.PauseGame();
+        }
+    }
+
     /**
      * 跳过教学
      */

+ 19 - 0
assets/scripts/games/ui/fightings/GameController.ts

@@ -155,6 +155,7 @@ export class GameController extends EventDispatcher{
         //初始化栅栏
         this.InitFence();
         this.GameOver=false;
+        this.paused=false;
     }
 
     /**
@@ -180,6 +181,21 @@ export class GameController extends EventDispatcher{
         this.GameOver=true;
     }
 
+    paused:boolean;
+    /**
+     * 暂停游戏
+     */
+    PauseGame():void{
+        this.paused=true;
+    }
+
+    /**
+     * 继续游戏
+     */
+    PlayGame():void{
+        this.paused=false;
+    }
+
     /**
      * 重玩
      */
@@ -259,6 +275,9 @@ export class GameController extends EventDispatcher{
     }
 
     Update(dt:number):void{
+        if(this.paused){
+            return;
+        }
         if(this.GameOver){
             return;
         }

+ 6 - 0
assets/scripts/games/ui/fightings/monsters/MonsterBase.ts

@@ -119,6 +119,12 @@ export class MonsterBase extends Component {
         if(GameController.single.GameOver){
             return;
         }
+        if(GameController.single.paused){
+            this.animation.pause();
+            return;
+        }else{
+            this.animation.resume();
+        }
         if(this.isDie){
             return;
         }

+ 10 - 0
assets/scripts/games/ui/signs/DayItemScript.ts

@@ -15,12 +15,22 @@ export class DayItemScript extends Component {
 
         let icon:SpriteComponent=find("Icon",this.node).getComponent(SpriteComponent);
         let num:LabelComponent=find("Num",this.node).getComponent(LabelComponent);
+
+        let dIcon:Node=find("diamondIcon",this.node);
+        let gIcon:Node=find("goldIcon",this.node);
+
+        dIcon.active=false;
+        gIcon.active=false;
         //0.金币 1.钻石 2.枪 3.栅栏
         switch (this.config.type) {
             case 0:
+                gIcon.active=true;
+                icon.node.active=false;
                 num.string=this.config.number;
                 break;
             case 1:
+                dIcon.active=true;
+                icon.node.active=false;
                 num.string=this.config.number;
                 break;
             case 2:

部分文件因为文件数量过多而无法显示