future il y a 1 an
Parent
commit
f14d81e5a0

+ 1 - 0
assets/data/data.ts

@@ -386,6 +386,7 @@ export class zhao_xi_jie_item_data{
     public res_name:string = "";
     public tips_res:string = "";
     public tips_res_name:string = "";
+    public finish_event_id:number = -1; //完成事件id
 }
 export class zhao_xi_jie_data{
     public tip_type:number = config.zhao_xi_jie_tip_type.select_tips;

+ 13 - 13
assets/resources/prefab/task/select_task_zhao_xi_jie.prefab

@@ -140,7 +140,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 3840,
-      "height": 2160
+      "height": 3840
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -578,7 +578,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 12,
-      "height": 1400
+      "height": 1700
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -819,7 +819,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 700,
+      "y": 850,
       "z": 0
     },
     "_lrot": {
@@ -860,7 +860,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 2500,
-      "height": 1400
+      "height": 1700
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1133,7 +1133,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 2500,
-      "height": 1400
+      "height": 1700
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1230,8 +1230,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 866.198,
-      "y": 681.88,
+      "x": 1058.494,
+      "y": 846,
       "z": 0
     },
     "_lrot": {
@@ -1271,8 +1271,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 59,
-      "height": 60
+      "width": 80,
+      "height": 80
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1431,8 +1431,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -845.472,
-      "y": 693.356,
+      "x": -1013.012,
+      "y": 846,
       "z": 0
     },
     "_lrot": {
@@ -1765,7 +1765,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 2500,
-      "height": 1500
+      "height": 1800
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1851,7 +1851,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 3840,
-      "height": 2160
+      "height": 3840
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 593 - 32
assets/resources/prefab/task/select_task_zhao_xi_jie_item.prefab

@@ -29,22 +29,28 @@
       },
       {
         "__id__": 44
+      },
+      {
+        "__id__": 58
+      },
+      {
+        "__id__": 72
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 58
+        "__id__": 80
       },
       {
-        "__id__": 60
+        "__id__": 82
       },
       {
-        "__id__": 62
+        "__id__": 84
       }
     ],
     "_prefab": {
-      "__id__": 64
+      "__id__": 86
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -106,7 +112,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 230.234,
+      "y": 314.23400000000004,
       "z": 0
     },
     "_lrot": {
@@ -455,7 +461,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 80.333,
+      "y": 160.333,
       "z": 0
     },
     "_lrot": {
@@ -804,7 +810,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -69.568,
+      "y": 2.432000000000002,
       "z": 0
     },
     "_lrot": {
@@ -1153,7 +1159,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -225.568,
+      "y": -156.568,
       "z": 0
     },
     "_lrot": {
@@ -1471,22 +1477,215 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_select_finishi_event",
+    "_objFlags": 512,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 59
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 65
+      },
+      {
+        "__id__": 67
+      },
+      {
+        "__id__": 69
+      }
+    ],
+    "_prefab": {
+      "__id__": 71
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 2,
+      "y": -315.667,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 512,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 58
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 60
+      },
+      {
+        "__id__": 62
+      }
+    ],
+    "_prefab": {
+      "__id__": 64
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 1
+      "__id__": 59
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 61
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 400,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "19qU0/MlRHiIt2B7tNWBNp"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 59
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 63
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_string": "选择完成事件",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 40,
+    "_fontSize": 40,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 1,
+    "_enableWrapText": false,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": true,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "ccYmI0Ie5MX76XMoy/TWrt"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "8c5rebHfdEf4R8JYHO/brn",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 58
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 66
+    },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 500,
-      "height": 600
+      "width": 400,
+      "height": 120
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1497,7 +1696,7 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "0b6duNu1dKVrnrpXRa+FsI"
+    "fileId": "2a3m9l4VpB95Jq6846Yvne"
   },
   {
     "__type__": "cc.Sprite",
@@ -1505,11 +1704,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 1
+      "__id__": 58
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 61
+      "__id__": 68
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1522,10 +1721,10 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
-    "_type": 0,
+    "_type": 1,
     "_fillType": 0,
     "_sizeMode": 0,
     "_fillCenter": {
@@ -1542,37 +1741,399 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "09nkPqxlFMFb0HVygV41mH"
+    "fileId": "e8eydjgptNvZhpCT47WFJD"
   },
   {
-    "__type__": "f6747oEv9NE5582jwwbiBNE",
+    "__type__": "cc.Button",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 1
+      "__id__": 58
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 63
+      "__id__": 70
     },
-    "btn_select_widget": {
-      "__id__": 2
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 3,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
     },
-    "lab_select_widget": {
-      "__id__": 3
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
     },
-    "btn_select_res": {
-      "__id__": 16
+    "_pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
     },
-    "lab_select_res": {
-      "__id__": 17
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
     },
-    "btn_delete": {
-      "__id__": 30
+    "_normalSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
     },
-    "btn_add_tip_res": {
-      "__id__": 44
+    "_hoverSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_pressedSprite": {
+      "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_disabledSprite": {
+      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": {
+      "__id__": 58
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e4ie/JO9NHjIxccPPpXkGB"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "a625RfrkVJDb/iEDNEKmDU",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_clear_finishi_event",
+    "_objFlags": 512,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 73
+      },
+      {
+        "__id__": 75
+      },
+      {
+        "__id__": 77
+      }
+    ],
+    "_prefab": {
+      "__id__": 79
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -162,
+      "y": -291.667,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 72
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 74
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 70,
+      "height": 70
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "b4dTxG1q5AY49hxzsMk8Sz"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 72
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 76
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "64c1f2bf-dc82-4530-bd30-7879d5a3e03e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "17vf6UZVlKD7JdbVtcUd/0"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 72
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 78
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 3,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressedColor": {
+      "__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": {
+      "__id__": 72
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "10I9zTutpOhJIhcGdKXDt2"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "38Cw33FTZHx6ehNphBXE5W",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 81
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 500,
+      "height": 800
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "0b6duNu1dKVrnrpXRa+FsI"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 83
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "09nkPqxlFMFb0HVygV41mH"
+  },
+  {
+    "__type__": "f6747oEv9NE5582jwwbiBNE",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 85
+    },
+    "btn_select_widget": {
+      "__id__": 2
+    },
+    "lab_select_widget": {
+      "__id__": 3
+    },
+    "btn_select_res": {
+      "__id__": 16
+    },
+    "lab_select_res": {
+      "__id__": 17
+    },
+    "btn_delete": {
+      "__id__": 30
+    },
+    "btn_add_tip_res": {
+      "__id__": 44
+    },
+    "btn_select_finishi_event": {
+      "__id__": 58
+    },
+    "lab_select_finishi_event": {
+      "__id__": 59
+    },
+    "btn_clear_finishi_event": {
+      "__id__": 72
     },
     "_id": ""
   },

+ 25 - 1
assets/script/edit/task/select_task_zhao_xi_jie_item.ts

@@ -1,6 +1,6 @@
 import { _decorator, Component, Label, Node, Sprite } from 'cc';
 import { tools } from '../../tools';
-import { bag_item_data, widget_item_data, zhao_xi_jie_item_data } from '../../../data/data';
+import { bag_item_data, event_item, widget_item_data, zhao_xi_jie_item_data } from '../../../data/data';
 import { Attributes } from '../Attributes';
 const { ccclass, property } = _decorator;
 
@@ -12,6 +12,9 @@ export class select_task_zhao_xi_jie_item extends Component {
     @property(Node) lab_select_res:Node = null;
     @property(Node) btn_delete:Node = null;
     @property(Node) btn_add_tip_res:Node = null;
+    @property(Node) btn_select_finishi_event:Node = null;
+    @property(Node) lab_select_finishi_event:Node = null;
+    @property(Node) btn_clear_finishi_event:Node = null;
     protected m_call_back = null;
     protected m_data:zhao_xi_jie_item_data = null;
     protected m_index:number = 0;
@@ -26,6 +29,9 @@ export class select_task_zhao_xi_jie_item extends Component {
         if(this.m_data.tips_res_name==undefined||this.m_data.tips_res_name==null){
             this.m_data.tips_res_name = ""
         }
+        if(this.m_data.finish_event_id==undefined||this.m_data.finish_event_id==null) {
+            this.m_data.finish_event_id = -1
+        }
         this.btn_add_tip_res.on(Node.EventType.TOUCH_END,()=>{
             tools.select_res_list((data:bag_item_data)=>{
                 this.m_data.tips_res = data.url;
@@ -56,6 +62,23 @@ export class select_task_zhao_xi_jie_item extends Component {
                 this.m_call_back(this)
             }
         })
+        this.btn_select_finishi_event.on(Node.EventType.TOUCH_END, ()=>{
+            let list = Attributes.Singleton.getEventList()
+            tools.show_select_evele_list(list,(data:event_item)=>{
+                this.m_data.finish_event_id = data.event_id
+                this.updateShowStatus()
+            })
+        })
+        this.btn_clear_finishi_event.on(Node.EventType.TOUCH_END, ()=>{
+            if(this.m_data.finish_event_id==-1) {
+                return
+            }
+            tools.show_dialog("是否清空完成事件?",()=>{
+                this.m_data.finish_event_id = -1
+                this.updateShowStatus()
+            })
+        })
+
         this.updateShowStatus()
     }
 
@@ -67,6 +90,7 @@ export class select_task_zhao_xi_jie_item extends Component {
         tools.loadUrl(this.m_data.res,this.node.getComponent(Sprite))
         this.lab_select_widget.getComponent(Label).string = this.m_data.widget_id!=-1?`当前选择的控件:${this.m_data.widget_id}`:"选择控件"
         this.lab_select_res.getComponent(Label).string = this.m_data.res_name.length>0?this.m_data.res_name:"选择资源"
+        this.lab_select_finishi_event.getComponent(Label).string = this.m_data.finish_event_id!=-1?`当前完成的事件:${this.m_data.finish_event_id}`:"选择完成事件"
         tools.loadUrl(this.m_data.tips_res,this.btn_add_tip_res.getComponent(Sprite))
     }
 }

+ 35 - 6
assets/script/run/TaskSchedule/taskServce.ts

@@ -17,6 +17,8 @@ export class taskServce {
     private static finishDaGuai:Map<number,boolean> = new Map;
     private static cur_collect_event:event_item = null;
     public static guo_ju_qing_binding_event_id:number = -1;
+    private static isFinishZhaoXiJieTask:boolean = false;
+    private static finishZhaoXiJieLastEventId:number = -1;
 
     //子场景
     private static mChildSceneData:task_data = null;
@@ -56,6 +58,8 @@ export class taskServce {
         taskServce.finishZhaoXiJie.clear();
         taskServce.cur_collect_event = null;
         taskServce.guo_ju_qing_binding_event_id = -1;
+        taskServce.isFinishZhaoXiJieTask = false;
+        taskServce.finishZhaoXiJieLastEventId = -1;
     }
 
     public static initZhaoXiJieTask(){
@@ -327,7 +331,7 @@ export class taskServce {
     }
 
 
-    public static onWidgetFinishEvent(widget_id:number){ //监听被动控件完成了自己的任务
+    public static onWidgetFinishEvent(widget_id:number, finish_event_item:event_item){ //监听被动控件完成了自己的任务
         if(taskServce.mTaskData==null){
             return
         }
@@ -354,12 +358,13 @@ export class taskServce {
         switch (taskServce.mTaskData.type) {
             case config.task_type.zhao_xi_jie:
                 let d = taskServce.taskZhaoXiJie.get(widget_id);
+                this.checkFinishZhaoXiJieEventItem(finish_event_item)
                 if(d===null||d===undefined){
                     return
                 }
                 taskServce.finishZhaoXiJie.set(widget_id,true)
                 ClientEvent.dispatchEvent(config.EventRun.SHOW_ZHAO_BU_TONG_FINISH_STATUS,d)
-                taskServce.checkFinishZhaoXiJieTask()
+                taskServce.checkFinishZhaoXiJieTask(widget_id)
             break;
             case config.task_type.guo_ju_qing:
             break;
@@ -401,16 +406,36 @@ export class taskServce {
         }
     }
 
-    public static checkFinishZhaoXiJieTask(){
+    public static checkFinishZhaoXiJieEventItem(finish_event_item:event_item) {
+        if(taskServce.isFinishZhaoXiJieTask) {
+            if(finish_event_item.event_id == taskServce.finishZhaoXiJieLastEventId) {
+                console.log('事件完成 事件完成 事件完成 执行')
+                gameManager.Singleton.unscheduleAllCallbacks()
+                let zhaoxijie_data = taskServce.mTaskData._zhao_xi_jie_data
+                ClientEvent.dispatchEvent(config.EventRun.ON_ZHAO_BU_TONG_ALL_FINISH, zhaoxijie_data)
+                let id = zhaoxijie_data.finish_event_id
+                taskServce.DistributedEvent(taskServce.getEventById(id))
+            }
+        }
+    }
+
+    public static checkFinishZhaoXiJieTask(widget_id:number) {
         let isFinish  = true;
+        taskServce.finishZhaoXiJieLastEventId = -1
         for (let index = 0; index < taskServce.mTaskData._zhao_xi_jie_data.widget_id_list.length; index++) {
             const element = taskServce.mTaskData._zhao_xi_jie_data.widget_id_list[index];
             if(!taskServce.finishZhaoXiJie.get(element.widget_id)){
                 isFinish = false
                 break;
+            } else {
+                if(element.widget_id==widget_id) { //找到最后一个
+                    taskServce.finishZhaoXiJieLastEventId = element.finish_event_id
+                }
             }
         }
 
+        taskServce.isFinishZhaoXiJieTask = isFinish
+
         if(isFinish){
             let zhaoxijie_data = taskServce.mTaskData._zhao_xi_jie_data
             let id = zhaoxijie_data.finish_event_id
@@ -422,13 +447,17 @@ export class taskServce {
                 ClientEvent.dispatchEvent(config.EventRun.ON_ZHAO_BU_TONG_ALL_FINISH, zhaoxijie_data)
             },dalay_time)
             if(id==-1){
+                taskServce.isFinishZhaoXiJieTask = false
+                taskServce.finishZhaoXiJieLastEventId = -1
                 return tools.showToast("未设置全部找完任务的下一个事件!")
             }else{
-                console.log('找茬全部找到执行 找茬全部找到执行 找茬全部找到执行 ==',id)
-                taskServce.DistributedEvent(taskServce.getEventById(id))
+                if(taskServce.finishZhaoXiJieLastEventId==-1) {
+                    console.log('直接执行了 直接执行了 直接执行了')
+                    taskServce.DistributedEvent(taskServce.getEventById(id))                
+                }
             }
         }
-    }
+    }    
 
     // public static onWidgetHideEvent(widget_id:number){ 
     //     let event = this.exeHideWidgeTaskDic.get(widget_id)

+ 2 - 2
assets/script/run/gameManager.ts

@@ -423,8 +423,8 @@ export class gameManager extends Component {
         node.getComponent(Sprite).spriteFrame = gameManager.getCacheSpriteFrameByName(att.res)
     }
 
-    onWidgetFinishEvent(widget_id:number){
-        taskServce.onWidgetFinishEvent(widget_id)
+    onWidgetFinishEvent(widget_id:number, finish_event_item:event_item){
+        taskServce.onWidgetFinishEvent(widget_id, finish_event_item)
     }
 
     onWidgetFailEvent(widget_id:number){

+ 1 - 0
assets/script/run/top_layer.ts

@@ -72,6 +72,7 @@ export class top_layer extends Component {
             let widget = this.mTextSoundList.get(widgetId);
             if(widget){
                 this.sound_text_content.active = true;
+                this.sound_text_content.getComponent(sound_text_content).initEventItem(event)
                 this.sound_text_content.getComponent(sound_text_content).show(widgetId,widget.att.text_sound_data,gameManager.getCacheSoundByName(widget.att.text_sound_data.sound_data.url))
             }else{
                 tools.showToast("配置音效和文字错误!")

+ 5 - 1
assets/script/run/ui/sound_text_content.ts

@@ -13,6 +13,7 @@ export class sound_text_content extends Component {
     private m_audio_clip:AudioClip = null;
     private mData:att_text_sound_data = null;
     private mWidgetId:number = 0;
+    private mEventItem:event_item = null;
     protected start(): void {
         this.node.addComponent(AudioSource)
     }
@@ -23,6 +24,9 @@ export class sound_text_content extends Component {
         }
         return this.mData.is_open_click_close;
     }
+    public initEventItem(event_item:event_item) {
+        this.mEventItem = event_item
+    }
     public show(widget_id,data:att_text_sound_data,ac:AudioClip){
         this.node.on(Node.EventType.TOUCH_START,()=>{
             if(this.isCanClose()){
@@ -78,7 +82,7 @@ export class sound_text_content extends Component {
         this.node.off(AudioSource.EventType.ENDED);
         this.node.active = false;
         if(isDispatchEvent) {
-            ClientEvent.dispatchEvent(config.EventRun.WIDGET_FINISH,this.mWidgetId)
+            ClientEvent.dispatchEvent(config.EventRun.WIDGET_FINISH,this.mWidgetId,this.mEventItem)
         }
     }
 }