From 55f976dac189cea5d68c838bd23a852b2f1b053f Mon Sep 17 00:00:00 2001 From: Tt <505623963@qq.com> Date: Sun, 15 May 2022 00:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E6=95=88=E5=A2=9E=E5=8A=A0=E5=BE=85?= =?UTF-8?q?=E6=9C=80=E7=BB=88=E7=B2=BE=E7=BB=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scene/cocos_generator.fire | 858 +++++++++++++----- .../cocos_generator/scene/cocos_generator.ts | 30 +- 2 files changed, 654 insertions(+), 234 deletions(-) diff --git a/assets/cocos_generator/scene/cocos_generator.fire b/assets/cocos_generator/scene/cocos_generator.fire index 0fbdf0a..542cea7 100644 --- a/assets/cocos_generator/scene/cocos_generator.fire +++ b/assets/cocos_generator/scene/cocos_generator.fire @@ -75,52 +75,52 @@ "__id__": 5 }, { - "__id__": 15 + "__id__": 25 }, { - "__id__": 17 + "__id__": 27 }, { - "__id__": 19 + "__id__": 29 }, { - "__id__": 21 + "__id__": 31 }, { - "__id__": 23 + "__id__": 33 }, { - "__id__": 25 + "__id__": 35 }, { - "__id__": 27 + "__id__": 37 }, { - "__id__": 38 + "__id__": 48 }, { - "__id__": 89 + "__id__": 99 }, { - "__id__": 95 + "__id__": 105 }, { - "__id__": 105 + "__id__": 115 }, { - "__id__": 114 + "__id__": 124 } ], "_active": true, "_components": [ { - "__id__": 125 + "__id__": 135 }, { - "__id__": 126 + "__id__": 136 }, { - "__id__": 127 + "__id__": 137 } ], "_prefab": null, @@ -654,6 +654,21 @@ "_children": [ { "__id__": 13 + }, + { + "__id__": 15 + }, + { + "__id__": 17 + }, + { + "__id__": 19 + }, + { + "__id__": 21 + }, + { + "__id__": 23 } ], "_active": true, @@ -787,6 +802,411 @@ "preload": false, "_id": "dey05oKrBIspvsDa6pOIQz" }, + { + "__type__": "cc.Node", + "_name": "ball", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 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": "62yJ9h7oxK4py5qfmsd2uU" + }, + { + "__type__": "cc.AudioSource", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_clip": { + "__uuid__": "09755b7e-b45f-4f42-ae5a-7dad81bcef36" + }, + "_volume": 1, + "_mute": false, + "_loop": false, + "_firstlyEnabled": true, + "playOnLoad": false, + "preload": false, + "_id": "15D//Tgj9DbZjsz2ag7xE2" + }, + { + "__type__": "cc.Node", + "_name": "card", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 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": "61qHA54d1JobGml1hny2qQ" + }, + { + "__type__": "cc.AudioSource", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_clip": { + "__uuid__": "40949095-e79a-4586-89ae-0bb1e6a79759" + }, + "_volume": 1, + "_mute": false, + "_loop": false, + "_firstlyEnabled": true, + "playOnLoad": false, + "preload": false, + "_id": "d5Ye71ti9IPoHGg8M2qsZT" + }, + { + "__type__": "cc.Node", + "_name": "co", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 20 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 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": "2al5XU4X5A8pDtPfkX6XWw" + }, + { + "__type__": "cc.AudioSource", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "_clip": { + "__uuid__": "1c38b117-c42c-4f10-9eae-c0f76e168b1e" + }, + "_volume": 1, + "_mute": false, + "_loop": false, + "_firstlyEnabled": true, + "playOnLoad": false, + "preload": false, + "_id": "bfumtAT3FCIK+LGka2SEKQ" + }, + { + "__type__": "cc.Node", + "_name": "gj", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 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": "39XwjbSw9GFJNYsAB7RJW5" + }, + { + "__type__": "cc.AudioSource", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_clip": { + "__uuid__": "9ef307ba-1c37-48b1-937c-837d8339e3df" + }, + "_volume": 1, + "_mute": false, + "_loop": false, + "_firstlyEnabled": true, + "playOnLoad": false, + "preload": false, + "_id": "eemSGK1i5M+4P2O8YbvDp+" + }, + { + "__type__": "cc.Node", + "_name": "ta", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 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": "5dhTTODmpBU4SmvtdzSUQ7" + }, + { + "__type__": "cc.AudioSource", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_clip": { + "__uuid__": "4406dcde-3da4-49df-bb0d-8300ce9c9328" + }, + "_volume": 1, + "_mute": false, + "_loop": false, + "_firstlyEnabled": true, + "playOnLoad": false, + "preload": false, + "_id": "d3CCevJ8xBRI7rH8q4Hauy" + }, { "__type__": "cc.Node", "_name": "2-进入游æˆç”»é¢,çƒæ°”çƒä»Žé¡µé¢", @@ -798,7 +1218,7 @@ "_active": false, "_components": [ { - "__id__": 16 + "__id__": 26 } ], "_prefab": null, @@ -854,7 +1274,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 15 + "__id__": 25 }, "_enabled": true, "_materials": [ @@ -892,7 +1312,7 @@ "_active": false, "_components": [ { - "__id__": 18 + "__id__": 28 } ], "_prefab": null, @@ -948,7 +1368,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 17 + "__id__": 27 }, "_enabled": true, "_materials": [ @@ -986,7 +1406,7 @@ "_active": false, "_components": [ { - "__id__": 20 + "__id__": 30 } ], "_prefab": null, @@ -1042,7 +1462,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 19 + "__id__": 29 }, "_enabled": true, "_materials": [ @@ -1080,7 +1500,7 @@ "_active": false, "_components": [ { - "__id__": 22 + "__id__": 32 } ], "_prefab": null, @@ -1136,7 +1556,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 21 + "__id__": 31 }, "_enabled": true, "_materials": [ @@ -1174,7 +1594,7 @@ "_active": false, "_components": [ { - "__id__": 24 + "__id__": 34 } ], "_prefab": null, @@ -1230,7 +1650,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 23 + "__id__": 33 }, "_enabled": true, "_materials": [ @@ -1268,7 +1688,7 @@ "_active": false, "_components": [ { - "__id__": 26 + "__id__": 36 } ], "_prefab": null, @@ -1324,7 +1744,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 25 + "__id__": 35 }, "_enabled": true, "_materials": [ @@ -1360,19 +1780,19 @@ }, "_children": [ { - "__id__": 28 + "__id__": 38 }, { - "__id__": 30 + "__id__": 40 }, { - "__id__": 32 + "__id__": 42 }, { - "__id__": 34 + "__id__": 44 }, { - "__id__": 36 + "__id__": 46 } ], "_active": true, @@ -1430,13 +1850,13 @@ "_name": "bg", "_objFlags": 0, "_parent": { - "__id__": 27 + "__id__": 37 }, "_children": [], "_active": true, "_components": [ { - "__id__": 29 + "__id__": 39 } ], "_prefab": null, @@ -1492,7 +1912,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 28 + "__id__": 38 }, "_enabled": true, "_materials": [ @@ -1524,13 +1944,13 @@ "_name": "bg_could", "_objFlags": 0, "_parent": { - "__id__": 27 + "__id__": 37 }, "_children": [], "_active": true, "_components": [ { - "__id__": 31 + "__id__": 41 } ], "_prefab": null, @@ -1586,7 +2006,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 30 + "__id__": 40 }, "_enabled": true, "_materials": [ @@ -1618,13 +2038,13 @@ "_name": "img_cloud1", "_objFlags": 0, "_parent": { - "__id__": 27 + "__id__": 37 }, "_children": [], "_active": true, "_components": [ { - "__id__": 33 + "__id__": 43 } ], "_prefab": null, @@ -1680,7 +2100,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 32 + "__id__": 42 }, "_enabled": true, "_materials": [ @@ -1712,13 +2132,13 @@ "_name": "img_cloud2", "_objFlags": 0, "_parent": { - "__id__": 27 + "__id__": 37 }, "_children": [], "_active": true, "_components": [ { - "__id__": 35 + "__id__": 45 } ], "_prefab": null, @@ -1774,7 +2194,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 34 + "__id__": 44 }, "_enabled": true, "_materials": [ @@ -1806,13 +2226,13 @@ "_name": "img_cloud3", "_objFlags": 0, "_parent": { - "__id__": 27 + "__id__": 37 }, "_children": [], "_active": true, "_components": [ { - "__id__": 37 + "__id__": 47 } ], "_prefab": null, @@ -1868,7 +2288,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 36 + "__id__": 46 }, "_enabled": true, "_materials": [ @@ -1904,16 +2324,16 @@ }, "_children": [ { - "__id__": 39 + "__id__": 49 }, { - "__id__": 48 + "__id__": 58 }, { - "__id__": 50 + "__id__": 60 }, { - "__id__": 75 + "__id__": 85 } ], "_active": true, @@ -1971,20 +2391,20 @@ "_name": "item_gun", "_objFlags": 0, "_parent": { - "__id__": 38 + "__id__": 48 }, "_children": [ { - "__id__": 40 + "__id__": 50 }, { - "__id__": 42 + "__id__": 52 }, { - "__id__": 44 + "__id__": 54 }, { - "__id__": 46 + "__id__": 56 } ], "_active": true, @@ -2042,13 +2462,13 @@ "_name": "gun1", "_objFlags": 0, "_parent": { - "__id__": 39 + "__id__": 49 }, "_children": [], "_active": false, "_components": [ { - "__id__": 41 + "__id__": 51 } ], "_prefab": null, @@ -2104,7 +2524,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 40 + "__id__": 50 }, "_enabled": true, "_materials": [ @@ -2144,13 +2564,13 @@ "_name": "gun2", "_objFlags": 0, "_parent": { - "__id__": 39 + "__id__": 49 }, "_children": [], "_active": false, "_components": [ { - "__id__": 43 + "__id__": 53 } ], "_prefab": null, @@ -2206,7 +2626,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 42 + "__id__": 52 }, "_enabled": true, "_materials": [ @@ -2246,13 +2666,13 @@ "_name": "gun3", "_objFlags": 0, "_parent": { - "__id__": 39 + "__id__": 49 }, "_children": [], "_active": false, "_components": [ { - "__id__": 45 + "__id__": 55 } ], "_prefab": null, @@ -2308,7 +2728,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 44 + "__id__": 54 }, "_enabled": true, "_materials": [ @@ -2348,13 +2768,13 @@ "_name": "gun4", "_objFlags": 0, "_parent": { - "__id__": 39 + "__id__": 49 }, "_children": [], "_active": false, "_components": [ { - "__id__": 47 + "__id__": 57 } ], "_prefab": null, @@ -2410,7 +2830,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 46 + "__id__": 56 }, "_enabled": true, "_materials": [ @@ -2450,13 +2870,13 @@ "_name": "img_card2", "_objFlags": 0, "_parent": { - "__id__": 38 + "__id__": 48 }, "_children": [], "_active": false, "_components": [ { - "__id__": 49 + "__id__": 59 } ], "_prefab": null, @@ -2512,7 +2932,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 48 + "__id__": 58 }, "_enabled": true, "_materials": [ @@ -2544,11 +2964,11 @@ "_name": "layout_balloon", "_objFlags": 0, "_parent": { - "__id__": 38 + "__id__": 48 }, "_children": [ { - "__id__": 51 + "__id__": 61 } ], "_active": true, @@ -2606,20 +3026,20 @@ "_name": "item", "_objFlags": 0, "_parent": { - "__id__": 50 + "__id__": 60 }, "_children": [ { - "__id__": 52 + "__id__": 62 }, { - "__id__": 69 + "__id__": 79 }, { - "__id__": 71 + "__id__": 81 }, { - "__id__": 73 + "__id__": 83 } ], "_active": true, @@ -2677,32 +3097,32 @@ "_name": "res", "_objFlags": 0, "_parent": { - "__id__": 51 + "__id__": 61 }, "_children": [ { - "__id__": 53 + "__id__": 63 }, { - "__id__": 55 + "__id__": 65 }, { - "__id__": 57 + "__id__": 67 }, { - "__id__": 59 + "__id__": 69 }, { - "__id__": 61 + "__id__": 71 }, { - "__id__": 63 + "__id__": 73 }, { - "__id__": 65 + "__id__": 75 }, { - "__id__": 67 + "__id__": 77 } ], "_active": false, @@ -2760,13 +3180,13 @@ "_name": "img_balloon1_1", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 54 + "__id__": 64 } ], "_prefab": null, @@ -2822,7 +3242,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 53 + "__id__": 63 }, "_enabled": true, "_materials": [ @@ -2854,13 +3274,13 @@ "_name": "img_balloon1_2", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 56 + "__id__": 66 } ], "_prefab": null, @@ -2916,7 +3336,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 55 + "__id__": 65 }, "_enabled": true, "_materials": [ @@ -2948,13 +3368,13 @@ "_name": "img_balloon2_1", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 58 + "__id__": 68 } ], "_prefab": null, @@ -3010,7 +3430,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 57 + "__id__": 67 }, "_enabled": true, "_materials": [ @@ -3042,13 +3462,13 @@ "_name": "img_balloon2_2", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 60 + "__id__": 70 } ], "_prefab": null, @@ -3104,7 +3524,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 59 + "__id__": 69 }, "_enabled": true, "_materials": [ @@ -3136,13 +3556,13 @@ "_name": "img_balloon3_1", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 62 + "__id__": 72 } ], "_prefab": null, @@ -3198,7 +3618,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 61 + "__id__": 71 }, "_enabled": true, "_materials": [ @@ -3230,13 +3650,13 @@ "_name": "img_balloon3_2", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 64 + "__id__": 74 } ], "_prefab": null, @@ -3292,7 +3712,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 63 + "__id__": 73 }, "_enabled": true, "_materials": [ @@ -3324,13 +3744,13 @@ "_name": "img_balloon4_1", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 66 + "__id__": 76 } ], "_prefab": null, @@ -3386,7 +3806,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 65 + "__id__": 75 }, "_enabled": true, "_materials": [ @@ -3418,13 +3838,13 @@ "_name": "img_balloon4_2", "_objFlags": 0, "_parent": { - "__id__": 52 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 68 + "__id__": 78 } ], "_prefab": null, @@ -3480,7 +3900,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 67 + "__id__": 77 }, "_enabled": true, "_materials": [ @@ -3512,13 +3932,13 @@ "_name": "img_normal", "_objFlags": 0, "_parent": { - "__id__": 51 + "__id__": 61 }, "_children": [], "_active": true, "_components": [ { - "__id__": 70 + "__id__": 80 } ], "_prefab": null, @@ -3574,7 +3994,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 69 + "__id__": 79 }, "_enabled": true, "_materials": [ @@ -3606,13 +4026,13 @@ "_name": "img_fall", "_objFlags": 0, "_parent": { - "__id__": 51 + "__id__": 61 }, "_children": [], "_active": true, "_components": [ { - "__id__": 72 + "__id__": 82 } ], "_prefab": null, @@ -3668,7 +4088,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 71 + "__id__": 81 }, "_enabled": true, "_materials": [ @@ -3700,13 +4120,13 @@ "_name": "light", "_objFlags": 0, "_parent": { - "__id__": 51 + "__id__": 61 }, "_children": [], "_active": true, "_components": [ { - "__id__": 74 + "__id__": 84 } ], "_prefab": null, @@ -3762,7 +4182,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 73 + "__id__": 83 }, "_enabled": true, "_materials": [ @@ -3794,17 +4214,17 @@ "_name": "layout_card", "_objFlags": 0, "_parent": { - "__id__": 38 + "__id__": 48 }, "_children": [ { - "__id__": 76 + "__id__": 86 }, { - "__id__": 79 + "__id__": 89 }, { - "__id__": 84 + "__id__": 94 } ], "_active": true, @@ -3862,16 +4282,16 @@ "_name": "bg_gray", "_objFlags": 0, "_parent": { - "__id__": 75 + "__id__": 85 }, "_children": [], "_active": false, "_components": [ { - "__id__": 77 + "__id__": 87 }, { - "__id__": 78 + "__id__": 88 } ], "_prefab": null, @@ -3927,7 +4347,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 76 + "__id__": 86 }, "_enabled": true, "_materials": [ @@ -3959,7 +4379,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 76 + "__id__": 86 }, "_enabled": true, "_id": "84vPl/5oRDJK/OYsfRbEsm" @@ -3969,14 +4389,14 @@ "_name": "layout_txt", "_objFlags": 0, "_parent": { - "__id__": 75 + "__id__": 85 }, "_children": [ { - "__id__": 80 + "__id__": 90 }, { - "__id__": 82 + "__id__": 92 } ], "_active": false, @@ -4034,13 +4454,13 @@ "_name": "bg1", "_objFlags": 0, "_parent": { - "__id__": 79 + "__id__": 89 }, "_children": [], "_active": true, "_components": [ { - "__id__": 81 + "__id__": 91 } ], "_prefab": null, @@ -4096,7 +4516,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 80 + "__id__": 90 }, "_enabled": true, "_materials": [ @@ -4128,13 +4548,13 @@ "_name": "desc", "_objFlags": 0, "_parent": { - "__id__": 79 + "__id__": 89 }, "_children": [], "_active": true, "_components": [ { - "__id__": 83 + "__id__": 93 } ], "_prefab": null, @@ -4190,7 +4610,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 82 + "__id__": 92 }, "_enabled": true, "_materials": [ @@ -4225,14 +4645,14 @@ "_name": "layout_img", "_objFlags": 0, "_parent": { - "__id__": 75 + "__id__": 85 }, "_children": [ { - "__id__": 85 + "__id__": 95 }, { - "__id__": 87 + "__id__": 97 } ], "_active": false, @@ -4290,13 +4710,13 @@ "_name": "bg2", "_objFlags": 0, "_parent": { - "__id__": 84 + "__id__": 94 }, "_children": [], "_active": true, "_components": [ { - "__id__": 86 + "__id__": 96 } ], "_prefab": null, @@ -4352,7 +4772,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 85 + "__id__": 95 }, "_enabled": true, "_materials": [ @@ -4384,13 +4804,13 @@ "_name": "img", "_objFlags": 0, "_parent": { - "__id__": 84 + "__id__": 94 }, "_children": [], "_active": true, "_components": [ { - "__id__": 88 + "__id__": 98 } ], "_prefab": null, @@ -4446,7 +4866,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 87 + "__id__": 97 }, "_enabled": true, "_materials": [ @@ -4482,13 +4902,13 @@ }, "_children": [ { - "__id__": 90 + "__id__": 100 } ], "_active": true, "_components": [ { - "__id__": 94 + "__id__": 104 } ], "_prefab": null, @@ -4544,17 +4964,17 @@ "_name": "bg_title", "_objFlags": 0, "_parent": { - "__id__": 89 + "__id__": 99 }, "_children": [ { - "__id__": 91 + "__id__": 101 } ], "_active": true, "_components": [ { - "__id__": 93 + "__id__": 103 } ], "_prefab": null, @@ -4610,13 +5030,13 @@ "_name": "title", "_objFlags": 0, "_parent": { - "__id__": 90 + "__id__": 100 }, "_children": [], "_active": true, "_components": [ { - "__id__": 92 + "__id__": 102 } ], "_prefab": null, @@ -4672,7 +5092,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 91 + "__id__": 101 }, "_enabled": true, "_materials": [ @@ -4705,7 +5125,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 90 + "__id__": 100 }, "_enabled": true, "_materials": [ @@ -4737,7 +5157,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 89 + "__id__": 99 }, "_enabled": true, "_id": "78N5o1/GhHa5t0r3SoI14W" @@ -4751,16 +5171,16 @@ }, "_children": [ { - "__id__": 96 + "__id__": 106 }, { - "__id__": 98 + "__id__": 108 }, { - "__id__": 100 + "__id__": 110 }, { - "__id__": 102 + "__id__": 112 } ], "_active": false, @@ -4818,13 +5238,13 @@ "_name": "New Sprite(Splash)", "_objFlags": 0, "_parent": { - "__id__": 95 + "__id__": 105 }, "_children": [], "_active": true, "_components": [ { - "__id__": 97 + "__id__": 107 } ], "_prefab": null, @@ -4880,7 +5300,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 96 + "__id__": 106 }, "_enabled": true, "_materials": [ @@ -4912,13 +5332,13 @@ "_name": "bg_instructions", "_objFlags": 0, "_parent": { - "__id__": 95 + "__id__": 105 }, "_children": [], "_active": true, "_components": [ { - "__id__": 99 + "__id__": 109 } ], "_prefab": null, @@ -4974,7 +5394,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 98 + "__id__": 108 }, "_enabled": true, "_materials": [ @@ -5006,13 +5426,13 @@ "_name": "desc", "_objFlags": 0, "_parent": { - "__id__": 95 + "__id__": 105 }, "_children": [], "_active": true, "_components": [ { - "__id__": 101 + "__id__": 111 } ], "_prefab": null, @@ -5068,7 +5488,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 100 + "__id__": 110 }, "_enabled": true, "_materials": [ @@ -5103,16 +5523,16 @@ "_name": "btn_start", "_objFlags": 0, "_parent": { - "__id__": 95 + "__id__": 105 }, "_children": [], "_active": true, "_components": [ { - "__id__": 103 + "__id__": 113 }, { - "__id__": 104 + "__id__": 114 } ], "_prefab": null, @@ -5168,7 +5588,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 102 + "__id__": 112 }, "_enabled": true, "_materials": [ @@ -5200,7 +5620,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 102 + "__id__": 112 }, "_enabled": true, "_normalMaterial": null, @@ -5261,7 +5681,7 @@ "hoverSprite": null, "_N$disabledSprite": null, "_N$target": { - "__id__": 102 + "__id__": 112 }, "_id": "7095HuemhJQ40wHbz5jlAy" }, @@ -5274,13 +5694,13 @@ }, "_children": [ { - "__id__": 106 + "__id__": 116 }, { - "__id__": 108 + "__id__": 118 }, { - "__id__": 111 + "__id__": 121 } ], "_active": false, @@ -5338,13 +5758,13 @@ "_name": "speak_ske", "_objFlags": 0, "_parent": { - "__id__": 105 + "__id__": 115 }, "_children": [], "_active": true, "_components": [ { - "__id__": 107 + "__id__": 117 } ], "_prefab": null, @@ -5400,7 +5820,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 106 + "__id__": 116 }, "_enabled": true, "_materials": [ @@ -5440,16 +5860,16 @@ "_name": "btn_start", "_objFlags": 0, "_parent": { - "__id__": 105 + "__id__": 115 }, "_children": [], "_active": true, "_components": [ { - "__id__": 109 + "__id__": 119 }, { - "__id__": 110 + "__id__": 120 } ], "_prefab": null, @@ -5505,7 +5925,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 108 + "__id__": 118 }, "_enabled": true, "_materials": [ @@ -5537,7 +5957,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 108 + "__id__": 118 }, "_enabled": true, "_normalMaterial": null, @@ -5605,16 +6025,16 @@ "_name": "btn_stop", "_objFlags": 0, "_parent": { - "__id__": 105 + "__id__": 115 }, "_children": [], "_active": true, "_components": [ { - "__id__": 112 + "__id__": 122 }, { - "__id__": 113 + "__id__": 123 } ], "_prefab": null, @@ -5670,7 +6090,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 111 + "__id__": 121 }, "_enabled": true, "_materials": [ @@ -5702,7 +6122,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 111 + "__id__": 121 }, "_enabled": true, "_normalMaterial": null, @@ -5774,19 +6194,19 @@ }, "_children": [ { - "__id__": 115 + "__id__": 125 }, { - "__id__": 117 + "__id__": 127 }, { - "__id__": 119 + "__id__": 129 }, { - "__id__": 121 + "__id__": 131 }, { - "__id__": 123 + "__id__": 133 } ], "_active": false, @@ -5844,13 +6264,13 @@ "_name": "New Sprite(Splash)", "_objFlags": 0, "_parent": { - "__id__": 114 + "__id__": 124 }, "_children": [], "_active": true, "_components": [ { - "__id__": 116 + "__id__": 126 } ], "_prefab": null, @@ -5906,7 +6326,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 115 + "__id__": 125 }, "_enabled": true, "_materials": [ @@ -5938,13 +6358,13 @@ "_name": "img_light", "_objFlags": 0, "_parent": { - "__id__": 114 + "__id__": 124 }, "_children": [], "_active": true, "_components": [ { - "__id__": 118 + "__id__": 128 } ], "_prefab": null, @@ -6000,7 +6420,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 117 + "__id__": 127 }, "_enabled": true, "_materials": [ @@ -6032,13 +6452,13 @@ "_name": "img_co", "_objFlags": 0, "_parent": { - "__id__": 114 + "__id__": 124 }, "_children": [], "_active": true, "_components": [ { - "__id__": 120 + "__id__": 130 } ], "_prefab": null, @@ -6094,7 +6514,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 119 + "__id__": 129 }, "_enabled": true, "_materials": [ @@ -6126,13 +6546,13 @@ "_name": "img_gj", "_objFlags": 0, "_parent": { - "__id__": 114 + "__id__": 124 }, "_children": [], "_active": true, "_components": [ { - "__id__": 122 + "__id__": 132 } ], "_prefab": null, @@ -6188,7 +6608,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 121 + "__id__": 131 }, "_enabled": true, "_materials": [ @@ -6220,13 +6640,13 @@ "_name": "img_ta", "_objFlags": 0, "_parent": { - "__id__": 114 + "__id__": 124 }, "_children": [], "_active": true, "_components": [ { - "__id__": 124 + "__id__": 134 } ], "_prefab": null, @@ -6282,7 +6702,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 123 + "__id__": 133 }, "_enabled": true, "_materials": [ @@ -6366,25 +6786,25 @@ }, "layout_player": null, "layout_balloon": { - "__id__": 50 + "__id__": 60 }, "layout_card": { - "__id__": 75 + "__id__": 85 }, "layout_speak": { - "__id__": 105 + "__id__": 115 }, "layout_tip": { - "__id__": 114 + "__id__": 124 }, "item_gun": { - "__id__": 39 + "__id__": 49 }, "item_left": { - "__id__": 51 + "__id__": 61 }, "item_right": { - "__id__": 51 + "__id__": 61 }, "_id": "eaTVUpqahPfZeO9+sUI7RP" } diff --git a/assets/cocos_generator/scene/cocos_generator.ts b/assets/cocos_generator/scene/cocos_generator.ts index 2a2a6f3..1ad3223 100644 --- a/assets/cocos_generator/scene/cocos_generator.ts +++ b/assets/cocos_generator/scene/cocos_generator.ts @@ -102,7 +102,7 @@ export default class SceneComponent extends MyCocosSceneComponent { this.audioId = await pg.audio.playAudioByUrl(Game.getIns().question.audio); if (this.audioId > -1 && Game.getIns().state == GAME_STATE.RUNNING) { cc.audioEngine.stopAllEffects(); - // pg.audio.stopAudio(this.audioId); + pg.audio.stopAudio(this.audioId); } } initEvent() { @@ -144,7 +144,7 @@ export default class SceneComponent extends MyCocosSceneComponent { this.layout_start.active = false; if (this.audioId > -1 && Game.getIns().state != GAME_STATE.WAIT) { cc.audioEngine.stopAllEffects(); - // pg.audio.stopAudio(this.audioId); + pg.audio.stopAudio(this.audioId); } //开始 @@ -198,22 +198,13 @@ export default class SceneComponent extends MyCocosSceneComponent { pg.view.visible(pg.view.find(item, 'img_fall'), false); pg.view.visible(pg.view.find(item, 'light'), false); - pg.view.setNodeImg(pg.view.find(item, 'img_normal'), pg.view.find(res, 'img_balloon1_1')); - pg.view.setNodeImg(pg.view.find(item, 'img_fall'), pg.view.find(res, 'img_balloon1_2')); + let i = Math.ceil(Math.random() * 4); + pg.view.setNodeImg(pg.view.find(item, 'img_normal'), pg.view.find(res, `img_balloon${i}_1`)); + pg.view.setNodeImg(pg.view.find(item, 'img_fall'), pg.view.find(res, `img_balloon${i}_2`)); item.parent = this.layout_balloon; item.data = data; data.fish.node = item; - //渲染部分 - // if (data.type == "txt") { - // pg.view.visible(pg.view.find(item, 'layout_text'), true); - // pg.view.visible(pg.view.find(item, 'layout_img'), false); - // pg.view.setString(pg.view.find(item, "layout_text/text"), data.txt); - // } else { - // pg.view.visible(pg.view.find(item, 'layout_text'), false); - // pg.view.visible(pg.view.find(item, 'layout_img'), true); - // pg.view.setNetImg(pg.view.find(item, 'layout_img/img'), data.picUrl, { w: 118, h: 110 }) - // } //x y 起始点 和终点 进行 éšæœº cc.Tween.stopAllByTarget(item); //å·¦å¾€å³ @@ -266,10 +257,13 @@ export default class SceneComponent extends MyCocosSceneComponent { resolve(''); break; case GUN_STATE.SHUT_LEFT: + this.playLocalAudio("ball") break; case GUN_STATE.SHUT_RIGHT: + this.playLocalAudio("ball") break; case GUN_STATE.SHUT_MIDDLE: + this.playLocalAudio("ball") gun1.active = false; gun2.active = true; gun3.active = false; @@ -304,6 +298,9 @@ export default class SceneComponent extends MyCocosSceneComponent { pg.view.setNetImg(pg.view.find(layout_img, 'img'), data.picUrl, { w: 440, h: 286 }) } //动画效果 + this.playLocalAudio("card").then(() => { + pg.audio.playAudioByUrl(data.audioUrl); + }) layout.active = true; layout.opacity = 255; layout.scale = 0.1; @@ -316,13 +313,13 @@ export default class SceneComponent extends MyCocosSceneComponent { fishingRight(item, layout, data: Option) { return new Promise(async (resolve, reject) => { //弹弓动画。 - this.item_gun; await this.playGun(GUN_STATE.SHUT_MIDDLE); //爆炸效果 this.updateFishState(item, FISH_STATE.BREAK); await pg.time.delay(0.5); //æ°”çƒä¸‹è½ this.updateFishState(item, FISH_STATE.FALL); + cc.tween(item).repeatForever(cc.tween().by(0.2, { x: 25 }).by(0.4, { x: -50 }).by(0.2, { x: 25 })).start(); cc.tween(item).by(2, { y: -1500 }, { easing: cc.easing.quadIn }).call(async () => { //处ç†å†…容 data.fish.isOut = FISH_OUT.OUT; @@ -428,12 +425,15 @@ export default class SceneComponent extends MyCocosSceneComponent { switch (state) { case TIPS_STATE.COM: img = img_co; + this.playLocalAudio("co"); break; case TIPS_STATE.GOOD: img = img_gj; + this.playLocalAudio("gj"); break; case TIPS_STATE.TRY: img = img_ta; + this.playLocalAudio("ta"); break; } img.scale = 0; -- 2.21.0