From d73a42990b798afb06b23e6607badb69d3d65e21 Mon Sep 17 00:00:00 2001
From: jeff <852228187@qq.com>
Date: Wed, 2 Jun 2021 11:57:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E5=8A=9F?=
 =?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 play/assets/scene/prefab/hitItem.prefab   | 264 ++++++++++++++++++++--
 play/assets/scene/scene/hitItem.js        |  11 +-
 play/assets/scene/textures/btn_x.png      | Bin 0 -> 2221 bytes
 play/assets/scene/textures/btn_x.png.meta |  36 +++
 4 files changed, 292 insertions(+), 19 deletions(-)
 create mode 100644 play/assets/scene/textures/btn_x.png
 create mode 100644 play/assets/scene/textures/btn_x.png.meta

diff --git a/play/assets/scene/prefab/hitItem.prefab b/play/assets/scene/prefab/hitItem.prefab
index 88d6c85..8f0d71d 100644
--- a/play/assets/scene/prefab/hitItem.prefab
+++ b/play/assets/scene/prefab/hitItem.prefab
@@ -28,16 +28,19 @@
       },
       {
         "__id__": 14
+      },
+      {
+        "__id__": 20
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 24
+        "__id__": 30
       }
     ],
     "_prefab": {
-      "__id__": 25
+      "__id__": 31
     },
     "_opacity": 255,
     "_color": {
@@ -491,30 +494,252 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "hand",
+    "_name": "btn_x",
     "_objFlags": 0,
     "_parent": {
       "__id__": 1
     },
-    "_children": [
+    "_children": [],
+    "_active": true,
+    "_components": [
       {
         "__id__": 15
       },
+      {
+        "__id__": 16
+      },
       {
         "__id__": 18
       }
     ],
+    "_prefab": {
+      "__id__": 19
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 34,
+      "height": 34
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -178.892,
+        53.462,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "b7316664-aba4-4008-a54a-11908a6c0b15"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 17
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 0,
+    "transition": 0,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "57f79KAb0tNU7HjHMpUOk2e",
+    "handler": "onClickHide",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 9,
+    "_left": -20.391999999999996,
+    "_right": 0,
+    "_top": -23.962000000000003,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
+    },
+    "fileId": "49bqoo7I9FCKRZC0ySxp3O",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "hand",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 21
+      },
+      {
+        "__id__": 24
+      }
+    ],
     "_active": true,
     "_components": [
       {
-        "__id__": 21
+        "__id__": 27
       },
       {
-        "__id__": 22
+        "__id__": 28
       }
     ],
     "_prefab": {
-      "__id__": 23
+      "__id__": 29
     },
     "_opacity": 255,
     "_color": {
@@ -568,17 +793,17 @@
     "_name": "icon_dian",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 14
+      "__id__": 20
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 16
+        "__id__": 22
       }
     ],
     "_prefab": {
-      "__id__": 17
+      "__id__": 23
     },
     "_opacity": 255,
     "_color": {
@@ -632,7 +857,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 15
+      "__id__": 21
     },
     "_enabled": true,
     "_materials": [
@@ -675,17 +900,17 @@
     "_name": "icon_hand",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 14
+      "__id__": 20
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 19
+        "__id__": 25
       }
     ],
     "_prefab": {
-      "__id__": 20
+      "__id__": 26
     },
     "_opacity": 255,
     "_color": {
@@ -739,7 +964,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 18
+      "__id__": 24
     },
     "_enabled": true,
     "_materials": [
@@ -782,7 +1007,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 20
     },
     "_enabled": true,
     "_defaultClip": {
@@ -801,7 +1026,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 20
     },
     "_enabled": true,
     "alignMode": 1,
@@ -849,7 +1074,7 @@
       "__id__": 4
     },
     "handAnim": {
-      "__id__": 21
+      "__id__": 27
     },
     "sprite": {
       "__id__": 12
@@ -857,6 +1082,9 @@
     "tipClip": {
       "__uuid__": "e0bcf4cc-35a7-4d61-b202-8dd49299c2c0"
     },
+    "btnX": {
+      "__id__": 14
+    },
     "_id": ""
   },
   {
diff --git a/play/assets/scene/scene/hitItem.js b/play/assets/scene/scene/hitItem.js
index b48b688..1390363 100644
--- a/play/assets/scene/scene/hitItem.js
+++ b/play/assets/scene/scene/hitItem.js
@@ -8,7 +8,8 @@ cc.Class({
         tipsAnim: cc.Animation,
         handAnim: cc.Animation,
         sprite: cc.Sprite,
-        tipClip: cc.AudioClip
+        tipClip: cc.AudioClip,
+        btnX: cc.Node
     },
 
     data: null,
@@ -18,6 +19,7 @@ cc.Class({
         this.quan.active = false
         this.tipsAnim.node.active = false
         this.handAnim.node.active = false
+        this.btnX.active = false
     },
 
     onEnable() {
@@ -51,6 +53,7 @@ cc.Class({
         if (this._playing) return
         if (this.audioId) return
         if (this.data) {
+            this.btnX.active = true
             if (this.data.pic_url && this.data.gIdx == 0) {
                 tools.getSpriteFrimeByUrl(this.data.pic_url, (sp) => {
                     this.sprite.spriteFrame = sp
@@ -89,9 +92,15 @@ cc.Class({
         }
     },
 
+    onClickHide() {
+        this.sprite.node.active = false
+        this.hideBox()
+    },
+
     /**隐藏边框 */
     hideBox() {
         this.quan.active = false
+        this.btnX.active = false
         this.stopAudio()
     },
 
diff --git a/play/assets/scene/textures/btn_x.png b/play/assets/scene/textures/btn_x.png
new file mode 100644
index 0000000000000000000000000000000000000000..0251a4bd202498c3d93193e5b45d928068d78c73
GIT binary patch
literal 2221
zcmaJ@d010-77bEr0Fh1Eq~*<nu}H~ANJt_Xnh+wWL1YsQDp_7afGj2tiBwb;B>`+@
zlN}dCVGxU;t%87NA}Wp)No8DETSV#tB4R}<HnC#ok8$4jz4u$bd(J)g-t)&(hXk*&
zFmp0PAP^Qofs9c73L0MIr}{5tjk!j@IKlx@aF|p8Cv)Twg2tC}As|T15kjF5hre_C
zb;uWiFm@M(N5N67^%R~|jOG|(&`PmPk47MT{gg5eF9Cu9E+iC5sNiI42MCDxRB#i4
zg=NY7p*T@siW~|{2@dC_B=E?5(C;6Buacr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R&rFE6Mqhg3ynKX)TN~DBlW#r4exa-P
z(3Coqjnio_Sfg%{zhT}|MopeOKlPaNyj4v+$i9+Q*5>(R>Zfhl%m1Th`|aPI)z;B6
fJsUFJfiOngxE6T%C96Bt@B<MP5X?ADk4^sr;rpER

literal 0
HcmV?d00001

diff --git a/play/assets/scene/textures/btn_x.png.meta b/play/assets/scene/textures/btn_x.png.meta
new file mode 100644
index 0000000..c24fb7d
--- /dev/null
+++ b/play/assets/scene/textures/btn_x.png.meta
@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "617acbce-eb22-416b-b5d5-f1eaf7187ca9",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 34,
+  "height": 34,
+  "platformSettings": {},
+  "subMetas": {
+    "btn_x": {
+      "ver": "1.0.4",
+      "uuid": "b7316664-aba4-4008-a54a-11908a6c0b15",
+      "rawTextureUuid": "617acbce-eb22-416b-b5d5-f1eaf7187ca9",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 34,
+      "height": 34,
+      "rawWidth": 34,
+      "rawHeight": 34,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}
\ No newline at end of file
-- 
2.21.0