future hai 1 ano
pai
achega
b83cfe0909

+ 2 - 1
assets/data/data.ts

@@ -13,6 +13,7 @@ export class attributes_data{
     public z:number = 0;
     public width:number = 0;
     public height:number = 0;
+    public rotation:number = 0;
     public src:string = "";
     public src_name:string = "";
     public ani:string = "";
@@ -347,7 +348,7 @@ export class zhao_xi_jie_data{
     public tip_type:number = config.zhao_xi_jie_tip_type.select_tips;
     public widget_id_list:zhao_xi_jie_item_data[] = []
     public finish_event_id:number = -1; //全部找到之后执行的事件
-    static finish_widget_hidden_delay_time = 1.5; // 全部找到后组件隐藏延迟时间(无服务器返回,自主添加)
+    static finish_widget_hidden_delay_time = 0; // 全部找到后组件隐藏延迟时间(无服务器返回,自主添加)
 }
 export class guo_ju_qing_not_rule_data { //先创建数据模型,目前没有属性
 }

+ 191 - 8
assets/resources/prefab/run/widget/widget_slide.prefab

@@ -17,21 +17,25 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": null,
-    "_children": [],
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
     "_active": true,
     "_components": [
       {
-        "__id__": 2
+        "__id__": 10
       },
       {
-        "__id__": 4
+        "__id__": 12
       },
       {
-        "__id__": 6
+        "__id__": 14
       }
     ],
     "_prefab": {
-      "__id__": 8
+      "__id__": 16
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -62,6 +66,181 @@
     },
     "_id": ""
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "img_zhaobutong",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_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__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 4
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "2fb6dBYB5EYYgq8DPclikM"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 6
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "81848ce8-921b-4400-b961-a62e4d96f457@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_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": "09SSB3e1NPg40GNrwwI1y3"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 8
+    },
+    "_alignFlags": 45,
+    "_target": null,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 284,
+    "_originalHeight": 268,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "3eymg9tIZCSasassyeBH78"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "c4pJPnpxVMo4g7bwAUBatQ",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -72,7 +251,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 3
+      "__id__": 11
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -100,7 +279,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 5
+      "__id__": 13
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -142,11 +321,14 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 7
+      "__id__": 15
     },
     "icon": {
       "__id__": 1
     },
+    "img_zhaobutong": {
+      "__id__": 2
+    },
     "_id": ""
   },
   {
@@ -162,6 +344,7 @@
       "__id__": 0
     },
     "fileId": "e9NCYnkPlKdrNZpoOV/wXa",
+    "instance": null,
     "targetOverrides": null
   }
 ]

+ 0 - 1
assets/script/run/TaskSchedule/taskServce.ts

@@ -399,7 +399,6 @@ export class taskServce {
 
         if(isFinish){
             let id =taskServce.mTaskData._zhao_xi_jie_data.finish_event_id;
-            console.log('taskServce.mTaskData._zhao_xi_jie_data=',taskServce.mTaskData._zhao_xi_jie_data)
             ClientEvent.dispatchEvent(config.EventRun.ON_ZHAO_BU_TONG_ALL_FINISH, taskServce.mTaskData._zhao_xi_jie_data)
             if(id==-1){
                 return tools.showToast("未设置全部找完任务的下一个事件!")

+ 6 - 1
assets/script/run/widget/widget_base.ts

@@ -30,6 +30,7 @@ export class widget_base extends Component {
         this.mData = data;
         this.icon.getComponent(UITransform).contentSize = new Size(this.mData.att.width,this.mData.att.height)
         this.icon.position = new Vec3(this.mData.att.x,this.mData.att.y)
+        this.icon.angle = this.mData.att.rotation
         if(this.icon.getComponent(UIOpacity)===null){
             this.icon.addComponent(UIOpacity)
         }
@@ -138,7 +139,11 @@ export class widget_base extends Component {
                 case config.event_type.change_one_item_status: //改变自己的突变资源属性
                     let event_data_change_one_item_status = event.event_item_change_one_item_status_data
                     if(event_data_change_one_item_status!=null){
-                        gameManager.initUiBaseAtt(this.icon,event_data_change_one_item_status.att)
+                        // gameManager.initUiBaseAtt(this.icon,event_data_change_one_item_status.att)
+                        let att_res = event_data_change_one_item_status.att.res
+                        if(att_res.length > 0) {
+                            tools.loadUrl(att_res,this.icon.getComponent(Sprite))
+                        }
                     }
 
                 break;