From c50f80db863ef42ab188a93d1d2f1e6c72d37736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?computer=5C=E5=B0=BC=E5=8D=A1?= <203267346@qq.com> Date: Tue, 1 Jul 2025 10:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AEUI=E4=BF=AE=E6=94=B9=20=20gam?= =?UTF-8?q?e=E7=95=8C=E9=9D=A2UI=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/JiaZai.ts | 25 +++ assets/Script/SceneManager.ts | 19 +- assets/shop/img/shop_1.png.meta | 6 +- assets/shop/prefab/item.prefab | 12 +- assets/shop/prefab/shop.prefab | 2 +- library/uuid-to-mtime.json | 357 +++++++------------------------- 6 files changed, 113 insertions(+), 308 deletions(-) diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index ae36792..ffc5f48 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -42,6 +42,10 @@ export default class NewClass extends cc.Component { @property(cc.Node) Stamina: cc.Node = null; scheduleCallback: any; + private lastPauseClickTime: number = 0; // 用于记录上次点击的时间戳 + + @property(cc.Node) + setUi: cc.Node = null; // LIFE-CYCLE CALLBACKS: @@ -271,6 +275,27 @@ export default class NewClass extends cc.Component { } + openSet() { + const now = Date.now(); + if (now - this.lastPauseClickTime < 300) { + // 0.3秒内禁止再次点击 + return; + } + this.lastPauseClickTime = now; + cc.fx.AudioManager._instance.playEffect("anniu_little", null); + if (cc.fx.GameConfig.GM_INFO.openid == undefined) { + cc.fx.GameConfig.GM_INFO.openid = ""; + } + if (!this.setUi.active) { + // 第一次点击,打开并播放动画 + this.setUi.active = true; + this.setUi.getComponent(cc.Animation).play(); + } else { + // 再次点击,关闭节点 + this.setUi.active = false; + } + } + closeReward() { this.node.getChildByName("Reward").active = false; } diff --git a/assets/Script/SceneManager.ts b/assets/Script/SceneManager.ts index c90d969..fa57a17 100644 --- a/assets/Script/SceneManager.ts +++ b/assets/Script/SceneManager.ts @@ -149,25 +149,16 @@ export default class SceneManager extends cc.Component { MiniGameSdk.API.showToast("体力值减少"); cc.fx.GameTool.setUserHealth(-1, (data) => { }) -<<<<<<< HEAD - if(MapConroler._instance.count_Time){ + if (MapConroler._instance.count_Time) { let count_Time = MapConroler._instance.count_Time; let add_Time = MapConroler._instance.add_Time; let data = { - time:count_Time, - add_Time:add_Time, - result:"give_up" + time: count_Time, + add_Time: add_Time, + result: "give_up" } - cc.fx.GameTool.shushu_Track("finish_stage",data); + cc.fx.GameTool.shushu_Track("finish_stage", data); } -======= - let data = { - time: MapConroler._instance.count_Time, - add_Time: MapConroler._instance.add_Time, - result: "give_up" - } - cc.fx.GameTool.shushu_Track("finish_stage", data); ->>>>>>> 0a31a7a5abc2c505bf743aa596e1c765a0405152 } this.node.getChildByName("Pause").getChildByName("btn").getComponent("btnControl").setTouch(false); cc.fx.AudioManager._instance.playEffect("zhuan1", null); diff --git a/assets/shop/img/shop_1.png.meta b/assets/shop/img/shop_1.png.meta index 82a9f39..b8c7b8e 100644 --- a/assets/shop/img/shop_1.png.meta +++ b/assets/shop/img/shop_1.png.meta @@ -1,6 +1,6 @@ { "ver": "2.3.7", - "uuid": "58c32817-0174-4337-a981-3e35167eb35c", + "uuid": "1742fc3d-1b8c-4003-9979-8f29dadd7520", "importer": "texture", "type": "sprite", "wrapMode": "clamp", @@ -14,9 +14,9 @@ "subMetas": { "shop_1": { "ver": "1.0.6", - "uuid": "f174e2e2-2556-4acb-8ccd-97f3bed5b91d", + "uuid": "e03c6d2e-80b8-4f9b-abab-5f18bcdd71b8", "importer": "sprite-frame", - "rawTextureUuid": "58c32817-0174-4337-a981-3e35167eb35c", + "rawTextureUuid": "1742fc3d-1b8c-4003-9979-8f29dadd7520", "trimType": "auto", "trimThreshold": 1, "rotated": false, diff --git a/assets/shop/prefab/item.prefab b/assets/shop/prefab/item.prefab index f888d6d..c674087 100644 --- a/assets/shop/prefab/item.prefab +++ b/assets/shop/prefab/item.prefab @@ -172,7 +172,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "c708602e-74bd-4929-9850-6fa800129b1f" + "__uuid__": "8df4862f-bc72-4038-bc80-6bec5833a561" }, "_type": 0, "_sizeMode": 0, @@ -185,7 +185,9 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_atlas": null, + "_atlas": { + "__uuid__": "88f4116d-72c2-46cc-9f06-d164a85a9275" + }, "_id": "" }, { @@ -452,7 +454,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "c4ffe50c-173b-4bff-9661-3573003616ca" + "__uuid__": "7788da8f-ccb8-4cb4-9a46-1dd01f6186c7" }, "_type": 0, "_sizeMode": 1, @@ -465,7 +467,9 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_atlas": null, + "_atlas": { + "__uuid__": "88f4116d-72c2-46cc-9f06-d164a85a9275" + }, "_id": "" }, { diff --git a/assets/shop/prefab/shop.prefab b/assets/shop/prefab/shop.prefab index fec1040..3252c26 100644 --- a/assets/shop/prefab/shop.prefab +++ b/assets/shop/prefab/shop.prefab @@ -544,7 +544,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "f174e2e2-2556-4acb-8ccd-97f3bed5b91d" + "__uuid__": "e03c6d2e-80b8-4f9b-abab-5f18bcdd71b8" }, "_type": 0, "_sizeMode": 0, diff --git a/library/uuid-to-mtime.json b/library/uuid-to-mtime.json index 71877df..55702a4 100644 --- a/library/uuid-to-mtime.json +++ b/library/uuid-to-mtime.json @@ -10,8 +10,8 @@ "relativePath": "Scene" }, "4734c20c-0db8-4eb2-92ea-e692f4d70934": { - "asset": 1751270412078, - "meta": 1751270454721, + "asset": 1751273105659, + "meta": 1751277032087, "relativePath": "Script" }, "7a231473-d1df-4b05-8620-6376c36252c1": { @@ -120,8 +120,8 @@ "relativePath": "Script\\GameScene.js" }, "e92938d8-5d93-4823-8770-fd489523a2f5": { - "asset": 1751270412153, - "meta": 1751270455832, + "asset": 1751278351510, + "meta": 1751279358281, "relativePath": "UI\\UI" }, "bdc76845-baea-4381-911e-af437cccf839": { @@ -3249,24 +3249,14 @@ "meta": 1751270455138, "relativePath": "Script\\btnControl.ts" }, - "1dc936f8-7de8-4eae-91a0-4e48a1047e20": { - "asset": 1751270412042, - "meta": 1751270455381, - "relativePath": "Script\\JiaZai.ts" - }, - "809984f5-0183-4d45-9751-c6c56f5d1eb9": { - "asset": 1751270412050, - "meta": 1751270455784, - "relativePath": "Script\\SceneManager.ts" - }, "28d9b746-520c-4ddc-95f8-401692d28ffc": { "asset": 1751270412490, "meta": 1751270454721, "relativePath": "shop" }, "e4b11ec6-5712-4dba-ba33-eb23129e396a": { - "asset": 1751270412486, - "meta": 1751270455827, + "asset": 1751279307687, + "meta": 1751279358281, "relativePath": "shop\\img" }, "ac030bb2-163b-4609-8553-0d6e7e662d03": { @@ -3285,13 +3275,13 @@ "relativePath": "prefab\\map\\wall.prefab" }, "66281f32-0047-4af8-8237-90c93fc4b0e8": { - "asset": 1751270466840, - "meta": 1751270466846, + "asset": 1751284005345, + "meta": 1751284005353, "relativePath": "Scene\\HomeScene.fire" }, "4eaf518b-35ec-4262-928d-4d497c3f2830": { - "asset": 1751270412036, - "meta": 1751270455155, + "asset": 1751336325505, + "meta": 1751336325511, "relativePath": "Scene\\GameScene.fire" }, "50c01dd8-431f-43cc-820e-abb2a859d031": { @@ -3304,156 +3294,16 @@ "meta": 1751270456135, "relativePath": "res\\font\\font.png" }, - "49148440-dbc5-4936-b168-ac7707f80098": { - "asset": 1751270412450, - "meta": 1751270457112, - "relativePath": "shop\\img\\coins3.png" - }, - "ea09c71c-5b5d-4b24-9b62-d93b291d93c2": { - "asset": 1751270412448, - "meta": 1751270457102, - "relativePath": "shop\\img\\btn1.png" - }, - "5f5f473c-d88a-4bff-bb6b-2a5f6b2208e8": { - "asset": 1751270412449, - "meta": 1751270457092, - "relativePath": "shop\\img\\coins2.png" - }, - "1c56a793-7cd3-412f-a040-8a754a2f4d41": { - "asset": 1751270412449, - "meta": 1751270457109, - "relativePath": "shop\\img\\coins1.png" - }, - "270ef871-ac9d-4ba7-91d1-7d7624c3aed9": { - "asset": 1751270412451, - "meta": 1751270457130, - "relativePath": "shop\\img\\coins5.png" - }, - "30543705-d10e-4279-a2fb-d2225b570bb4": { - "asset": 1751270412452, - "meta": 1751270457127, - "relativePath": "shop\\img\\coins6.png" - }, "e401e735-bc45-4c02-ab15-ac8f4afbed44": { "asset": 1751270412100, "meta": 1751270457455, "relativePath": "TextureBlock\\block\\block2.png" }, - "eb639914-71d8-4def-a989-c4469533754d": { - "asset": 1751270412139, - "meta": 1751270457972, - "relativePath": "UI\\UI\\publicUI.png" - }, - "14a00731-8325-4675-8abd-da6b581a7266": { - "asset": 1751270412451, - "meta": 1751270457102, - "relativePath": "shop\\img\\coins4.png" - }, - "96c15f9c-935e-4e9d-b5c0-f95e5d429f5c": { - "asset": 1751270412453, - "meta": 1751270457128, - "relativePath": "shop\\img\\coins7.png" - }, - "4dbc349a-8dbd-4753-8e82-378b916ea36b": { - "asset": 1751270412454, - "meta": 1751270457148, - "relativePath": "shop\\img\\coins8.png" - }, - "58481a2a-4229-43d2-bd30-69e4f09cfe4b": { - "asset": 1751270412455, - "meta": 1751270457147, - "relativePath": "shop\\img\\coins_sz1.png" - }, - "6c076da3-bb21-4e43-9e7e-d88b44bd01f4": { - "asset": 1751270412456, - "meta": 1751270457151, - "relativePath": "shop\\img\\coins_sz10.png" - }, - "0734a70a-118d-4d9d-9a9f-9a61c11641d2": { - "asset": 1751270412455, - "meta": 1751270457148, - "relativePath": "shop\\img\\coins_sz0.png" - }, - "1e3dbd9c-6c1c-420b-9320-e27f3195e6d0": { - "asset": 1751270412454, - "meta": 1751270457169, - "relativePath": "shop\\img\\coins_di.png" - }, - "852ff94f-f07c-447b-93fa-a9adcb1a069b": { - "asset": 1751270412456, - "meta": 1751270457166, - "relativePath": "shop\\img\\coins_sz11.png" - }, - "6112faa1-3935-48de-a5a8-3369a63cead8": { - "asset": 1751270412457, - "meta": 1751270457170, - "relativePath": "shop\\img\\coins_sz12.png" - }, - "76467e5a-9a87-4d17-afae-777d7ff638a1": { - "asset": 1751270412458, - "meta": 1751270457193, - "relativePath": "shop\\img\\coins_sz4.png" - }, - "1217c0be-cc7e-41be-b105-7c26baf444ff": { - "asset": 1751270412458, - "meta": 1751270457178, - "relativePath": "shop\\img\\coins_sz2.png" - }, - "efc62fa5-f8bc-4661-8eb9-f6e2cb5b4ad7": { - "asset": 1751270412457, - "meta": 1751270457170, - "relativePath": "shop\\img\\coins_sz13.png" - }, - "e9077dbb-d18e-45d5-aae4-9f46b103ed05": { - "asset": 1751270412458, - "meta": 1751270457182, - "relativePath": "shop\\img\\coins_sz3.png" - }, - "774d1aad-d081-44e1-9d68-9a3fd767aba3": { - "asset": 1751270412459, - "meta": 1751270457193, - "relativePath": "shop\\img\\coins_sz5.png" - }, - "08a0b3cf-1219-46ba-8171-206dfe24151b": { - "asset": 1751270412459, - "meta": 1751270457198, - "relativePath": "shop\\img\\coins_sz6.png" - }, - "74db3129-e7a8-4b0b-baf9-e271bdfab9ba": { - "asset": 1751270412460, - "meta": 1751270457216, - "relativePath": "shop\\img\\coins_sz8.png" - }, - "47d4dd52-9152-4724-ab77-4e9d15e14c2e": { - "asset": 1751270412460, - "meta": 1751270457219, - "relativePath": "shop\\img\\coins_sz7.png" - }, - "3b8e0a01-7634-402d-a8d2-349fbbc809f6": { - "asset": 1751270412461, - "meta": 1751270457218, - "relativePath": "shop\\img\\coins_sz9.png" - }, - "406e8a3f-3b78-4541-90bb-ca79eefc1cb2": { - "asset": 1751270412473, - "meta": 1751270458818, - "relativePath": "shop\\img\\texture_atlas-0.plist" - }, - "12c63ed2-bf61-4b5b-8d37-781d02f4386c": { - "asset": 1751270412462, - "meta": 1751270457223, - "relativePath": "shop\\img\\cost_0.png" - }, "88f4116d-72c2-46cc-9f06-d164a85a9275": { "asset": 1751270412476, "meta": 1751270458818, "relativePath": "shop\\img\\texture_atlas-1.plist" }, - "76a01e2d-248a-494c-a56c-c14e4f26a3b0": { - "asset": 1751270412464, - "meta": 1751270457235, - "relativePath": "shop\\img\\cost_10.png" - }, "de906884-fc75-47a4-8e95-3bb20cbca688": { "asset": 1751270412490, "meta": 1751270457268, @@ -3464,161 +3314,41 @@ "meta": 1751270457278, "relativePath": "shop\\script\\shop.ts" }, - "b6cc00c9-4bc9-48a7-b075-af04e0f8cfe8": { - "asset": 1751270412463, - "meta": 1751270457237, - "relativePath": "shop\\img\\cost_1.png" - }, - "1019c0e2-cc2c-4dde-93e4-86b676bc69cd": { - "asset": 1751270412465, - "meta": 1751270457238, - "relativePath": "shop\\img\\cost_11.png" - }, "9df3aaf8-59bc-4eff-aa56-554ab3d4d2cb": { "asset": 1751270412091, "meta": 1751270457301, "relativePath": "TextureBlock\\block\\AutoAtlas.pac" }, "c31c74ba-a2b0-4b6f-ac21-5c87b44aea4a": { - "asset": 1751270412144, - "meta": 1751270457480, + "asset": 1751278466064, + "meta": 1751279358281, "relativePath": "UI\\UI\\set" }, - "227db116-a70e-4157-b553-bfe8d6d18a6a": { - "asset": 1751270412465, - "meta": 1751270457249, - "relativePath": "shop\\img\\cost_2.png" - }, - "db683201-2fb0-4753-bf65-3ae7ef314627": { - "asset": 1751270412466, - "meta": 1751270457251, - "relativePath": "shop\\img\\cost_3.png" - }, - "c8b66182-996c-4377-8d0a-024d8b17e581": { - "asset": 1751270412467, - "meta": 1751270457269, - "relativePath": "shop\\img\\cost_6.png" - }, "b01ef5c5-2755-455d-acb4-ba3818f5e331": { - "asset": 1751270834671, - "meta": 1751270834676, + "asset": 1751279316360, + "meta": 1751279316366, "relativePath": "shop\\prefab\\shop.prefab" }, "a81d74d9-943b-4d0e-aad5-2999276d3447": { - "asset": 1751270412488, - "meta": 1751270457262, + "asset": 1751279087714, + "meta": 1751279087718, "relativePath": "shop\\prefab\\item.prefab" }, - "f1cd9c7b-a0b7-41fc-94c2-db60d6a51281": { - "asset": 1751270412466, - "meta": 1751270457254, - "relativePath": "shop\\img\\cost_4.png" - }, - "9ffc3971-f097-4de5-b88a-2e5e6d78104a": { - "asset": 1751270412467, - "meta": 1751270457253, - "relativePath": "shop\\img\\cost_5.png" - }, "4466b8d6-b468-4cb5-bc57-7a2bd3df12e4": { "asset": 1751270412488, "meta": 1751270457285, "relativePath": "shop\\prefab\\Tops.prefab" }, - "c6022e1d-b8c5-498b-a3c1-740387f6d647": { - "asset": 1751270412468, - "meta": 1751270457292, - "relativePath": "shop\\img\\cost_8.png" - }, - "f0c1b219-0608-4a6c-aef0-59fc9db4955e": { - "asset": 1751270412468, - "meta": 1751270457286, - "relativePath": "shop\\img\\cost_7.png" - }, - "6a34fed9-0090-400c-8845-15234002c44a": { - "asset": 1751270412475, - "meta": 1751270457366, - "relativePath": "shop\\img\\texture_atlas-0.png" - }, - "6b7f9211-7903-45b4-b2e2-d388ba17e935": { - "asset": 1751270412469, - "meta": 1751270457307, - "relativePath": "shop\\img\\cost_yuan.png" - }, "6971355d-0542-42f6-96ec-4244dbcc5897": { "asset": 1751270412481, "meta": 1751270457434, "relativePath": "shop\\img\\texture_atlas-1.png" }, - "621ae85f-f4e4-48a1-9e97-1cdfd769677d": { - "asset": 1751270412469, - "meta": 1751270457299, - "relativePath": "shop\\img\\cost_9.png" - }, - "a7020897-1d42-416a-ab6f-b99429684626": { - "asset": 1751270412481, - "meta": 1751270457318, - "relativePath": "shop\\img\\tx.png" - }, - "06097023-184a-44ab-be97-104b5b23de45": { - "asset": 1751270412483, - "meta": 1751270457339, - "relativePath": "shop\\img\\txt2.png" - }, - "d824166e-71a9-461c-bd7d-2be020ff85b7": { - "asset": 1751270412482, - "meta": 1751270457334, - "relativePath": "shop\\img\\txt1.png" - }, "abd65429-c263-4d3a-84f3-1c26b1433094": { "asset": 1751270412472, "meta": 1751270457344, "relativePath": "shop\\img\\shop_2.jpg" }, - "306b721d-bd6d-4dc2-9c7e-0d42021be3b3": { - "asset": 1751270412141, - "meta": 1751270458275, - "relativePath": "UI\\UI\\set\\闇囧姩00.png" - }, - "fcaa412a-64a2-4cdc-937f-1f4fbc527dfc": { - "asset": 1751270412141, - "meta": 1751270458285, - "relativePath": "UI\\UI\\set\\tiaodik.png" - }, - "964de756-e8ea-44b4-9371-ea2af234714a": { - "asset": 1751270412142, - "meta": 1751270458275, - "relativePath": "UI\\UI\\set\\闊充箰00.png" - }, - "58c32817-0174-4337-a981-3e35167eb35c": { - "asset": 1751270412471, - "meta": 1751270457415, - "relativePath": "shop\\img\\shop_1.png" - }, - "f8ebdf98-79f3-41fd-8663-8abd3225fa66": { - "asset": 1751270412142, - "meta": 1751270458285, - "relativePath": "UI\\UI\\set\\闇囧姩01.png" - }, - "f5f584ca-c27f-40a2-96e6-6bc312eb3c21": { - "asset": 1751270412143, - "meta": 1751270458270, - "relativePath": "UI\\UI\\set\\闊充箰01.png" - }, - "dfa1190c-5129-4775-b495-d2aca6a3a5bf": { - "asset": 1751270412144, - "meta": 1751270458283, - "relativePath": "UI\\UI\\set\\闊虫晥01.png" - }, - "ea182daa-7a43-48b5-9a08-f20f71980deb": { - "asset": 1751270412143, - "meta": 1751270458269, - "relativePath": "UI\\UI\\set\\闊虫晥00.png" - }, - "d8bf615a-752c-47ba-84e3-8ef47d9c4de1": { - "asset": 1751270412486, - "meta": 1751270457424, - "relativePath": "shop\\img\\鍟嗗煄.jpg" - }, "2234ab2c-a7b4-48be-90e0-ae7aa58e9d91": { "asset": 1751270412045, "meta": 1751270455618, @@ -3653,5 +3383,60 @@ "asset": 1751270412246, "meta": 1751270456212, "relativePath": "res\\texture_Block\\door.png" + }, + "1b0e3a45-c168-4de9-b34e-9f9fa9d30fef": { + "asset": 1751271441713, + "meta": 1751271661823, + "relativePath": "shop\\img\\shuzi.png" + }, + "569f5a4d-beff-465f-be16-fc3bcf467850": { + "asset": 1751271441715, + "meta": 1751271661840, + "relativePath": "shop\\img\\shuzi.plist" + }, + "1dc936f8-7de8-4eae-91a0-4e48a1047e20": { + "asset": 1751273589501, + "meta": 1751273603663, + "relativePath": "Script\\JiaZai.ts" + }, + "19d95d9d-e645-41ac-b4b3-00819e12514a": { + "asset": 1751274346640, + "meta": 1751274347780, + "relativePath": "Script\\setUi.ts" + }, + "eb639914-71d8-4def-a989-c4469533754d": { + "asset": 1751276022241, + "meta": 1751277008396, + "relativePath": "UI\\UI\\publicUI.png" + }, + "de563d8c-eee2-42f8-bbbb-47b6149eed20": { + "asset": 1751275491632, + "meta": 1751278351573, + "relativePath": "UI\\UI\\案例.jpg" + }, + "1742fc3d-1b8c-4003-9979-8f29dadd7520": { + "asset": 1750303030000, + "meta": 1751279307750, + "relativePath": "shop\\img\\shop_1.png" + }, + "809984f5-0183-4d45-9751-c6c56f5d1eb9": { + "asset": 1751279545655, + "meta": 1751279617513, + "relativePath": "Script\\SceneManager.ts" + }, + "b5630b1e-0e45-4b38-a5c4-76b2fa8fad52": { + "asset": 1751253608000, + "meta": 1751282635583, + "relativePath": "UI\\UI\\set\\texture_atlas-0.plist" + }, + "e05177b7-0b07-4cd3-8573-0cd2432f6181": { + "asset": 1751253896000, + "meta": 1751282894314, + "relativePath": "UI\\UI\\set\\commonUi-0.png" + }, + "373b1886-4974-4bc1-97c8-1a87410cf7fe": { + "asset": 1751253896000, + "meta": 1751282894386, + "relativePath": "UI\\UI\\set\\commonUi-0.plist" } } \ No newline at end of file