From 1b56cb7a8c3ca138b8daddb9dd3c253725b72348 Mon Sep 17 00:00:00 2001 From: panfudan Date: Thu, 21 Aug 2025 13:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E7=89=88=E6=9C=AC=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8E=BB=E7=94=B3=E8=AF=B7=E7=94=B5=E5=AD=90=E7=89=88?= =?UTF-8?q?=E6=9D=83=E5=92=8C=E8=BD=AF=E8=91=97=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/gui/Hinfo.prefab | 1537 ++++++++++++++++- assets/resources/gui/role_controller.prefab | 140 +- .../script/game/common/GameDataSyncManager.ts | 22 +- .../script/game/common/SingletonModuleComp.ts | 172 +- assets/script/game/common/config/heroSet.ts | 15 +- assets/script/game/map/GoodsComp.ts | 8 + assets/script/game/map/HCardUICom.ts | 19 +- assets/script/game/map/HInfoComp.ts | 77 +- .../script/game/wx_clound_client_api/USAGE.md | 1 + .../game/wx_clound_client_api/WxCloudApi.ts | 8 +- .../cloud_functions/cocos_cloud/API.md | 1 + .../cocos_cloud/modules/response.js | 1 + 12 files changed, 1816 insertions(+), 185 deletions(-) diff --git a/assets/resources/gui/Hinfo.prefab b/assets/resources/gui/Hinfo.prefab index 6a55ddca..38984e85 100644 --- a/assets/resources/gui/Hinfo.prefab +++ b/assets/resources/gui/Hinfo.prefab @@ -98,22 +98,28 @@ }, { "__id__": 1131 + }, + { + "__id__": 1143 + }, + { + "__id__": 1160 } ], "_active": true, "_components": [ { - "__id__": 1143 + "__id__": 1206 }, { - "__id__": 1145 + "__id__": 1208 }, { - "__id__": 1147 + "__id__": 1210 } ], "_prefab": { - "__id__": 1149 + "__id__": 1212 }, "_lpos": { "__type__": "cc.Vec3", @@ -10854,7 +10860,7 @@ }, { "__type__": "cc.Node", - "_name": "luck", + "_name": "lock", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -13753,7 +13759,7 @@ }, { "__type__": "cc.Node", - "_name": "luck", + "_name": "lock", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -16652,7 +16658,7 @@ }, { "__type__": "cc.Node", - "_name": "luck", + "_name": "lock", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -19551,7 +19557,7 @@ }, { "__type__": "cc.Node", - "_name": "luck", + "_name": "lock", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -22792,7 +22798,7 @@ "__id__": 1014 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 1086 @@ -25764,7 +25770,7 @@ }, { "__type__": "cc.Node", - "_name": "luck", + "_name": "lock", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -26029,6 +26035,1511 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "unLock", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 1144 + } + ], + "_active": true, + "_components": [ + { + "__id__": 1150 + }, + { + "__id__": 1152 + }, + { + "__id__": 1154 + }, + { + "__id__": 1156 + } + ], + "_prefab": { + "__id__": 1159 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -443, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1143 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 1145 + }, + { + "__id__": 1147 + } + ], + "_prefab": { + "__id__": 1149 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5.748, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1144 + }, + "_enabled": true, + "__prefab": { + "__id__": 1146 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 83.6 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f9XXwieV9I7LC+MqBQsy+n" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1144 + }, + "_enabled": true, + "__prefab": { + "__id__": 1148 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "解锁", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 45, + "_fontSize": 45, + "_fontFamily": "Arial", + "_lineHeight": 60, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 58, + "g": 58, + "b": 58, + "a": 255 + }, + "_outlineWidth": 4, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "32/6OKLaNKGJU/2RfG2Htj" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "533AY8xk5BvZangk2QW4RO", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1143 + }, + "_enabled": true, + "__prefab": { + "__id__": 1151 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 280, + "height": 104 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "79DDGFJDlKwbey9/lWHco4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1143 + }, + "_enabled": true, + "__prefab": { + "__id__": 1153 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@44c62", + "__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": "be3MPG3bxAVa+BT9+4UTMS" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1143 + }, + "_enabled": true, + "__prefab": { + "__id__": 1155 + }, + "_alignFlags": 44, + "_target": null, + "_left": 220, + "_right": 220, + "_top": 0, + "_bottom": 145, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 46, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5feKjWWk5AiJYTjAm9lZtn" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1143 + }, + "_enabled": true, + "__prefab": { + "__id__": 1157 + }, + "clickEvents": [ + { + "__id__": 1158 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "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": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "330WEaBhxEaoyzJJnT11bU" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "f8dd2ODYatM+Zh5DQ/izWwv", + "handler": "uplockhero", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "060W3WS6tEbaqlGjjU3xwO", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "unLockNeed", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 1161 + }, + { + "__id__": 1169 + } + ], + "_active": true, + "_components": [ + { + "__id__": 1201 + }, + { + "__id__": 1203 + } + ], + "_prefab": { + "__id__": 1205 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -355, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1160 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 1162 + }, + { + "__id__": 1164 + }, + { + "__id__": 1166 + } + ], + "_prefab": { + "__id__": 1168 + }, + "_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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1161 + }, + "_enabled": true, + "__prefab": { + "__id__": 1163 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 700, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8f7OUFszFGBYc3brIBE1WN" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1161 + }, + "_enabled": true, + "__prefab": { + "__id__": 1165 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 38 + }, + "_spriteFrame": { + "__uuid__": "6cd18ad7-7b15-43fc-b1bc-33a3973a6564@42c3a", + "__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": "4997rSEZRI+Ihuf0KLtyq9" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1161 + }, + "_enabled": true, + "__prefab": { + "__id__": 1167 + }, + "_alignFlags": 45, + "_target": null, + "_left": -10, + "_right": -10, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 789, + "_originalHeight": 50, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "29a2gS6tZH4Yl88DxRolV3" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bePjkckyNPVbTYCd1GhDq0", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "need", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1160 + }, + "_children": [ + { + "__id__": 1170 + }, + { + "__id__": 1176 + }, + { + "__id__": 1184 + }, + { + "__id__": 1190 + } + ], + "_active": true, + "_components": [ + { + "__id__": 1196 + }, + { + "__id__": 1198 + } + ], + "_prefab": { + "__id__": 1200 + }, + "_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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1169 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 1171 + }, + { + "__id__": 1173 + } + ], + "_prefab": { + "__id__": 1175 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -74.5, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1170 + }, + "_enabled": true, + "__prefab": { + "__id__": 1172 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 51, + "height": 47 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6fvGnEwRVGt6MbQHrvz473" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1170 + }, + "_enabled": true, + "__prefab": { + "__id__": 1174 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@94586", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": { + "__uuid__": "7b0e7263-3b25-4fec-8935-abdd67c4b86d", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "be1mmTn1hJ5ZllJI39VNMG" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3cak+ZQDVPL7yAbLaBwVAp", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "has", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1169 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 1177 + }, + { + "__id__": 1179 + }, + { + "__id__": 1181 + } + ], + "_prefab": { + "__id__": 1183 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 26.51904296875, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1176 + }, + "_enabled": true, + "__prefab": { + "__id__": 1178 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 73.51904296875, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0fEGy50vVBrKiqKJor8JcE" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1176 + }, + "_enabled": true, + "__prefab": { + "__id__": 1180 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 61, + "g": 255, + "b": 0, + "a": 255 + }, + "_string": "99999", + "_horizontalAlign": 2, + "_verticalAlign": 1, + "_actualFontSize": 25, + "_fontSize": 25, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 41, + "g": 40, + "b": 40, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "22TqzkTONFz7sgI0/Vp7/Z" + }, + { + "__type__": "545c05XsG9GDJispEGWKvYv", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1176 + }, + "_enabled": false, + "__prefab": { + "__id__": 1182 + }, + "templateMode": true, + "watchPath": "", + "labelType": "cc.Label", + "watchPathArr": [ + "data.data.exp" + ], + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a8DVWi9iVJb4PVX1+jqNPa" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c7FX/tNnNILL+cOhPmAvwa", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "xiegang", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1169 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 1185 + }, + { + "__id__": 1187 + } + ], + "_prefab": { + "__id__": 1189 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 28.51904296875, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1184 + }, + "_enabled": true, + "__prefab": { + "__id__": 1186 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12.3349609375, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "22r1wBMx9CCKgf4aMZetBO" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1184 + }, + "_enabled": true, + "__prefab": { + "__id__": 1188 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "/", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 30, + "_fontSize": 30, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 41, + "g": 40, + "b": 40, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14SkfvGzNFuohfMqHRYJeQ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6fuJzSo6hCYKaggZom4MAJ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "need", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1169 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 1191 + }, + { + "__id__": 1193 + } + ], + "_prefab": { + "__id__": 1195 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 42.85400390625, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1190 + }, + "_enabled": true, + "__prefab": { + "__id__": 1192 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 73.51904296875, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "36W0JRFzZLpqXu71PddsM0" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1190 + }, + "_enabled": true, + "__prefab": { + "__id__": 1194 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "99999", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 25, + "_fontSize": 25, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 41, + "g": 40, + "b": 40, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "45j5RzV/NMB5ROao1P05/9" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bfTRPMHAZKI4LbLkqwyPsz", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1169 + }, + "_enabled": true, + "__prefab": { + "__id__": 1197 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "24CPeyoGJBKbcLxmCW0HBg" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1169 + }, + "_enabled": true, + "__prefab": { + "__id__": 1199 + }, + "_resizeMode": 0, + "_layoutType": 1, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 2, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": true, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "91FOcvZ19ALIGOguSFN7OA" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "64vCtHTm9Eqace5ESpbA0+", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1160 + }, + "_enabled": true, + "__prefab": { + "__id__": 1202 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "81ZWXY20FHD6zsLZniAu0h" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1160 + }, + "_enabled": true, + "__prefab": { + "__id__": 1204 + }, + "_alignFlags": 44, + "_target": null, + "_left": 20, + "_right": 20, + "_top": 0, + "_bottom": 260, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "62gr9GLxhG3JTaqGzTf4hY" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d16b3NZqFAdapVJrNSUS4u", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -26039,7 +27550,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1144 + "__id__": 1207 }, "_contentSize": { "__type__": "cc.Size", @@ -26067,7 +27578,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1146 + "__id__": 1209 }, "_alignFlags": 45, "_target": null, @@ -26103,7 +27614,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1148 + "__id__": 1211 }, "_id": "" }, diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index 5efadc26..b67dd9eb 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -13743,7 +13743,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -14112,7 +14112,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -14481,7 +14481,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -14850,7 +14850,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -16380,7 +16380,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -16946,7 +16946,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -17512,7 +17512,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -18078,7 +18078,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -18644,7 +18644,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -19210,7 +19210,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -19776,7 +19776,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -20342,7 +20342,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": -74.475, + "y": 3, "z": 0 } }, @@ -24113,7 +24113,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -289, + "x": -142, "y": 0, "z": 0 }, @@ -25051,7 +25051,7 @@ }, { "__type__": "cc.Node", - "_name": "heros", + "_name": "fight", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -25079,7 +25079,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -142, + "x": 5, "y": 0, "z": 0 }, @@ -25239,7 +25239,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "66aRnMzUNJT7JfmjGwQKaT" + "fileId": "24CllqOIRNbp7s1IW4j0uU" }, { "__type__": "cc.Sprite", @@ -25264,7 +25264,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@864ce", + "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@ceee5", "__expectedType__": "cc.SpriteFrame" }, "_type": 0, @@ -25284,7 +25284,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "404j0IpaFLap9Fy8jf2s5C" + "fileId": "571wESdL9Ch5Aga22pMiOB" }, { "__type__": "cc.PrefabInfo", @@ -25294,7 +25294,7 @@ "asset": { "__id__": 0 }, - "fileId": "ceuhLCdJBJpo7n0PYDcCnl", + "fileId": "00lvUE1TVIr5IJdUtl2KYh", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -25325,7 +25325,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "acvWGdl+FCz49w9mrZvAyL" + "fileId": "d9I3+60/JAH62yMJ/YCQc2" }, { "__type__": "cc.Sprite", @@ -25370,7 +25370,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "775O/jIEZFDJJWO95yOSqW" + "fileId": "ce3MO/ALxKS6CECBmzKUeQ" }, { "__type__": "cc.Widget", @@ -25406,7 +25406,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "2fkiaXCEhNabWOjHF9Egng" + "fileId": "1bjoS7XVZKC7untXSJCRQ1" }, { "__type__": "cc.PrefabInfo", @@ -25416,7 +25416,7 @@ "asset": { "__id__": 0 }, - "fileId": "00Gy6Lv5VDrbtQldm2T+Ee", + "fileId": "eblW2XA4tBf6SV/oGAOQaW", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -25557,7 +25557,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "26BrlSRDVCkpi2ui5yIv8E" + "fileId": "ecXrazZPxEHJnUFMi9YYDI" }, { "__type__": "cc.Sprite", @@ -25582,7 +25582,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@864ce", + "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@ceee5", "__expectedType__": "cc.SpriteFrame" }, "_type": 0, @@ -25602,7 +25602,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "1aYbkTiyZHM73DdqVex/VP" + "fileId": "9eMR9M5uBMg6hUMwVlNGOx" }, { "__type__": "cc.PrefabInfo", @@ -25612,7 +25612,7 @@ "asset": { "__id__": 0 }, - "fileId": "055UbZLjhDoK+n6A4TtgGE", + "fileId": "514wN4XnROFrTZsHG02NaE", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -25693,7 +25693,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "52gC9yGyBA16JEZXIpGsaz" + "fileId": "1080gTuGJAj6NyUWSuWJ8L" }, { "__type__": "cc.Label", @@ -25717,7 +25717,7 @@ "b": 255, "a": 255 }, - "_string": "英雄", + "_string": "战斗", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 25, @@ -25761,7 +25761,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "81fMHOlHhNWoUd6OWVWTSV" + "fileId": "ceEdeMablGt4AP0tFEI/VO" }, { "__type__": "cc.PrefabInfo", @@ -25771,7 +25771,7 @@ "asset": { "__id__": 0 }, - "fileId": "535buBkgFF976vfLYXPiJW", + "fileId": "f2GqKr+KhGDYVFRGQ66hwq", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -25802,7 +25802,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "abSAFPTB9FQp3DaDTN3um/" + "fileId": "c5hHeNcQpC4pbaGmROTCFs" }, { "__type__": "cc.Sprite", @@ -25847,7 +25847,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "52ZUkZ8ahLDYv00qXLuIBe" + "fileId": "f2LE7uQZZKEq+JHQsvTuG7" }, { "__type__": "cc.Widget", @@ -25883,7 +25883,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "cdJWrH5SpAdqaCjwZdBY4P" + "fileId": "beAmjTm9NHV5Zcm66Lw5TZ" }, { "__type__": "cc.PrefabInfo", @@ -25893,7 +25893,7 @@ "asset": { "__id__": 0 }, - "fileId": "3cUPE46lZDFpIoIEa5SKtH", + "fileId": "50V4KrAplBdpEu34KxASqU", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -25924,7 +25924,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "5fdCvllLREuogKgB0x8O69" + "fileId": "f3WGDj8lZGL4ph5tNYqAs/" }, { "__type__": "cc.Button", @@ -25984,7 +25984,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "a8F6hzq39Dwrxs35dF97yA" + "fileId": "48+/XTINJBgbqup+dSL/9D" }, { "__type__": "cc.ClickEvent", @@ -25994,7 +25994,7 @@ "component": "", "_componentId": "11498TbVJpO6qmZ8m9k55Zx", "handler": "btn_func", - "customEventData": "heros" + "customEventData": "fight" }, { "__type__": "cc.PrefabInfo", @@ -26004,14 +26004,14 @@ "asset": { "__id__": 0 }, - "fileId": "2f00V76bdDG6jYeodHvdkw", + "fileId": "9elmcSk75AzaRXoY2+iXEn", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { "__type__": "cc.Node", - "_name": "fight", + "_name": "heros", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -26039,7 +26039,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 5, + "x": 152, "y": 0, "z": 0 }, @@ -26199,7 +26199,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "24CllqOIRNbp7s1IW4j0uU" + "fileId": "66aRnMzUNJT7JfmjGwQKaT" }, { "__type__": "cc.Sprite", @@ -26224,7 +26224,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@ceee5", + "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@864ce", "__expectedType__": "cc.SpriteFrame" }, "_type": 0, @@ -26244,7 +26244,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "571wESdL9Ch5Aga22pMiOB" + "fileId": "404j0IpaFLap9Fy8jf2s5C" }, { "__type__": "cc.PrefabInfo", @@ -26254,7 +26254,7 @@ "asset": { "__id__": 0 }, - "fileId": "00lvUE1TVIr5IJdUtl2KYh", + "fileId": "ceuhLCdJBJpo7n0PYDcCnl", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -26285,7 +26285,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "d9I3+60/JAH62yMJ/YCQc2" + "fileId": "acvWGdl+FCz49w9mrZvAyL" }, { "__type__": "cc.Sprite", @@ -26330,7 +26330,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "ce3MO/ALxKS6CECBmzKUeQ" + "fileId": "775O/jIEZFDJJWO95yOSqW" }, { "__type__": "cc.Widget", @@ -26366,7 +26366,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "1bjoS7XVZKC7untXSJCRQ1" + "fileId": "2fkiaXCEhNabWOjHF9Egng" }, { "__type__": "cc.PrefabInfo", @@ -26376,7 +26376,7 @@ "asset": { "__id__": 0 }, - "fileId": "eblW2XA4tBf6SV/oGAOQaW", + "fileId": "00Gy6Lv5VDrbtQldm2T+Ee", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -26517,7 +26517,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "ecXrazZPxEHJnUFMi9YYDI" + "fileId": "26BrlSRDVCkpi2ui5yIv8E" }, { "__type__": "cc.Sprite", @@ -26542,7 +26542,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@ceee5", + "__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@864ce", "__expectedType__": "cc.SpriteFrame" }, "_type": 0, @@ -26562,7 +26562,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "9eMR9M5uBMg6hUMwVlNGOx" + "fileId": "1aYbkTiyZHM73DdqVex/VP" }, { "__type__": "cc.PrefabInfo", @@ -26572,7 +26572,7 @@ "asset": { "__id__": 0 }, - "fileId": "514wN4XnROFrTZsHG02NaE", + "fileId": "055UbZLjhDoK+n6A4TtgGE", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -26653,7 +26653,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "1080gTuGJAj6NyUWSuWJ8L" + "fileId": "52gC9yGyBA16JEZXIpGsaz" }, { "__type__": "cc.Label", @@ -26677,7 +26677,7 @@ "b": 255, "a": 255 }, - "_string": "战斗", + "_string": "英雄", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 25, @@ -26721,7 +26721,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "ceEdeMablGt4AP0tFEI/VO" + "fileId": "81fMHOlHhNWoUd6OWVWTSV" }, { "__type__": "cc.PrefabInfo", @@ -26731,7 +26731,7 @@ "asset": { "__id__": 0 }, - "fileId": "f2GqKr+KhGDYVFRGQ66hwq", + "fileId": "535buBkgFF976vfLYXPiJW", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -26762,7 +26762,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "c5hHeNcQpC4pbaGmROTCFs" + "fileId": "abSAFPTB9FQp3DaDTN3um/" }, { "__type__": "cc.Sprite", @@ -26807,7 +26807,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "f2LE7uQZZKEq+JHQsvTuG7" + "fileId": "52ZUkZ8ahLDYv00qXLuIBe" }, { "__type__": "cc.Widget", @@ -26843,7 +26843,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "beAmjTm9NHV5Zcm66Lw5TZ" + "fileId": "cdJWrH5SpAdqaCjwZdBY4P" }, { "__type__": "cc.PrefabInfo", @@ -26853,7 +26853,7 @@ "asset": { "__id__": 0 }, - "fileId": "50V4KrAplBdpEu34KxASqU", + "fileId": "3cUPE46lZDFpIoIEa5SKtH", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -26884,7 +26884,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "f3WGDj8lZGL4ph5tNYqAs/" + "fileId": "5fdCvllLREuogKgB0x8O69" }, { "__type__": "cc.Button", @@ -26944,7 +26944,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "48+/XTINJBgbqup+dSL/9D" + "fileId": "a8F6hzq39Dwrxs35dF97yA" }, { "__type__": "cc.ClickEvent", @@ -26954,7 +26954,7 @@ "component": "", "_componentId": "11498TbVJpO6qmZ8m9k55Zx", "handler": "btn_func", - "customEventData": "fight" + "customEventData": "heros" }, { "__type__": "cc.PrefabInfo", @@ -26964,7 +26964,7 @@ "asset": { "__id__": 0 }, - "fileId": "9elmcSk75AzaRXoY2+iXEn", + "fileId": "2f00V76bdDG6jYeodHvdkw", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -26985,7 +26985,7 @@ "__id__": 1439 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 1459 @@ -27945,7 +27945,7 @@ "__id__": 1480 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 1500 @@ -28903,7 +28903,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 738, + "width": 444, "height": 100 }, "_anchorPoint": { @@ -28969,8 +28969,8 @@ }, "_alignFlags": 44, "_target": null, - "_left": -9, - "_right": -9, + "_left": 138, + "_right": 138, "_top": 1178.6190000000001, "_bottom": 0, "_horizontalCenter": 0, diff --git a/assets/script/game/common/GameDataSyncManager.ts b/assets/script/game/common/GameDataSyncManager.ts index e335495a..dee862bb 100644 --- a/assets/script/game/common/GameDataSyncManager.ts +++ b/assets/script/game/common/GameDataSyncManager.ts @@ -96,6 +96,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 更新出战英雄配置异常:`, error); + smc.error() return false; } } @@ -122,6 +123,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 重置出战英雄配置异常:`, error); + smc.error() return false; } } @@ -151,6 +153,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 添加英雄异常:`, error); + smc.error() return false; } } @@ -178,6 +181,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 更新英雄异常:`, error); + smc.error() return false; } } @@ -206,6 +210,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 设置英雄属性异常:`, error); + smc.error() return false; } } @@ -216,11 +221,11 @@ export class GameDataSyncManager { * @param levels 升级级数(默认1级) * @returns 是否成功 */ - async levelUpHero(heroId: number, exp:number,gold:number,levels: number = 1,): Promise { + async levelUpHero(heroId: number,levels: number = 1,): Promise { try { console.log(`[GameDataSyncManager]: 英雄升级 ID:${heroId}, 级数:${levels}`); - const result = await WxCloudApi.levelUpHero(heroId, exp,gold,levels); + const result = await WxCloudApi.levelUpHero(heroId,levels); if (result.result.code === 200) { // 远程修改成功,同步本地数据 @@ -233,6 +238,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 英雄升级异常:`, error); + smc.error() return false; } } @@ -260,6 +266,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 增加道具异常:`, error); + smc.error() return false; } } @@ -289,6 +296,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 消耗道具异常:`, error); + smc.error() return false; } } @@ -318,6 +326,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 增加天赋点异常:`, error); + smc.error() return false; } } @@ -345,6 +354,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 消耗天赋点异常:`, error); + smc.error() return false; } } @@ -372,6 +382,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 增加装备异常:`, error); + smc.error() return false; } } @@ -399,10 +410,12 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 消耗装备异常:`, error); + smc.error() return false; } } + async addGameProperty(property: string, value: any): Promise { try { @@ -417,11 +430,12 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 增加游戏数据异常:`, error); + smc.error() return false; } } - async spendGameProperty(property: string, value: any): Promise { + async spendGameProperty(property: string|Record, value: any = undefined ): Promise { try { console.log(`[GameDataSyncManager]: 消耗游戏数据 ${property} = ${value}`); const result = await WxCloudApi.spendGameDataField(property, value); @@ -431,6 +445,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 消耗游戏数据异常:`, error); + smc.error() return false; } } @@ -463,6 +478,7 @@ export class GameDataSyncManager { } } catch (error) { console.error(`[GameDataSyncManager]: 加载云端数据异常:`, error); + smc.error() return false; } } diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index 1c929451..44bf5f5e 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -9,6 +9,8 @@ import { gameDataSyncManager } from "./GameDataSyncManager"; import { GameSet } from "./config/BoxSet"; import { Test } from "./Test"; import { GameEvent } from "./config/GameEvent"; +import { Items } from "./config/Items"; +import { HeroInfo } from "./config/heroSet"; // import { Role } from "../role/Role"; @@ -94,6 +96,8 @@ export class SingletonModuleComp extends ecs.Comp { return typeof wx !== 'undefined' && typeof (wx as any).getSystemInfoSync === 'function'; } + + //调试用 syncDataFromLocal(){ if(this.isWxClient()) return @@ -101,6 +105,18 @@ export class SingletonModuleComp extends ecs.Comp { this.gameDataSyncManager.overrideLocalDataWithRemote(loginResult, "本地调试"); } + addHero(hero_uuid:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.addHero(hero_uuid)){ + this.heros[hero_uuid]={ uuid:hero_uuid, lv:1, } + return true + } + return false + } + this.heros[hero_uuid]={ uuid:hero_uuid, lv:1, } + return true + } + setFightHero(position:number,heroId:number,autoSave:boolean=true){ this.fight_heros[position] = heroId; if(this.isWxClient()){ @@ -121,9 +137,11 @@ export class SingletonModuleComp extends ecs.Comp { } return heros_uuid } - levelUpHero(heroId:number,exp:number,gold:number){ + + + levelUpHero(heroId:number){ if(this.isWxClient()){ - let result=this.gameDataSyncManager.levelUpHero(heroId,exp,gold); + let result=this.gameDataSyncManager.levelUpHero(heroId); if(result){ this.heros[heroId].lv++; return true @@ -136,98 +154,112 @@ export class SingletonModuleComp extends ecs.Comp { } } - - // ==================== 统一的数据操作接口 ==================== - - /** - * 增加游戏数据属性(统一接口) - * @param property 属性名 - * property list: - * ***gold:金币 - * ***diamond:钻石 - * ***meat:肉 - * ***exp:经验 - * ***score:分数 - * ***mission:关卡 - * @param value 增加的值 - * @param autoSave 是否自动保存 (默认true) - * @returns 操作结果 - */ + error(){ + oops.gui.toast("数据处理异常,请重试或重新登录") + } addExp(exp:number,autoSave:boolean=true){ - this.data.exp+=exp if(this.isWxClient()){ - this.gameDataSyncManager.addGameProperty("exp",exp) + if(this.gameDataSyncManager.addGameProperty("exp",exp)){ + this.data.exp+=exp + return true + } + return false } + this.data.exp+=exp + return true } addGold(gold:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.addGameProperty("gold",gold)){ + this.data.gold+=gold + oops.message.dispatchEvent(GameEvent.GOLD_UPDATE) + return true + } + this.error() + return false + } this.data.gold+=gold oops.message.dispatchEvent(GameEvent.GOLD_UPDATE) - if(this.isWxClient()){ - this.gameDataSyncManager.addGameProperty("gold",gold) - } + return true } addDiamond(diamond:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.addGameProperty("diamond",diamond)){ + this.data.diamond+=diamond + oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE) + return true + } + return false + } this.data.diamond+=diamond oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE) - if(this.isWxClient()){ - this.gameDataSyncManager.addGameProperty("diamond",diamond) - } + return true } addMission(mission:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.addGameProperty("mission",mission)){ + this.data.mission+=mission + oops.message.dispatchEvent(GameEvent.MISSION_UPDATE) + return true + } + return false + } this.data.mission+=mission oops.message.dispatchEvent(GameEvent.MISSION_UPDATE) - if(this.isWxClient()){ - this.gameDataSyncManager.addGameProperty("mission",mission) - } + return true } spendExp(exp:number,autoSave:boolean=true){ - this.data.exp-=exp if(this.isWxClient()){ - this.gameDataSyncManager.spendGameProperty("exp",exp) + if(this.gameDataSyncManager.spendGameProperty("exp",exp)){ + this.data.exp-=exp + return true + } + return false } + this.data.exp-=exp + return true } spendGold(gold:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.spendGameProperty("gold",gold)){ + this.data.gold-=gold + oops.message.dispatchEvent(GameEvent.GOLD_UPDATE) + return true + } + return false + } this.data.gold-=gold oops.message.dispatchEvent(GameEvent.GOLD_UPDATE) - if(this.isWxClient()){ - this.gameDataSyncManager.spendGameProperty("gold",gold) - } + return true } spendDiamond(diamond:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.spendGameProperty("diamond",diamond)){ + this.data.diamond-=diamond + oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE) + return true + } + return false + } this.data.diamond-=diamond oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE) - if(this.isWxClient()){ - this.gameDataSyncManager.spendGameProperty("diamond",diamond) - } + return true } /** * 消耗游戏数据属性(统一接口) - * - 支持单个字段:spendGameProperty('gold', 10) - * - 支持多个字段:spendGameProperty({ gold: 10, exp: 5 }) - * 只有当所有字段都满足扣除条件时,才会一次性扣减 - * @param property 属性名或属性映射 - * @param value 消耗的值(当 property 为字符串时有效) - * @param autoSave 是否自动保存 (默认true) - * @returns 是否成功消耗 + * 处理多个字段:spendGameProperty({ gold: 10, exp: 5 }) */ - async spendGameProperty(property: string | Record, value: any = undefined, autoSave: boolean = true): Promise { - // 单字段扣除 - if (typeof property === 'string') { - const currentValue = this.data[property] || 0; - if (currentValue < value) { - console.warn(`[SMC]: ${property} 不足,当前: ${currentValue}, 需要: ${value}`); - return false; + async spendGameProperty(property: Record, autoSave: boolean = true): Promise { + if(this.isWxClient()){ + if(this.gameDataSyncManager.spendGameProperty(property)){ + return true } - const newValue = currentValue - value; - this.data[property] = newValue; - console.log(`[SMC]: 消耗游戏数据 ${property} = ${value}, 当前值: ${newValue}`); - return true; + return false } - // 多字段扣除(原子性:全部满足才扣) const deductions = property as Record; // 1) 校验是否全部满足 @@ -237,10 +269,10 @@ export class SingletonModuleComp extends ecs.Comp { const current = this.data[key] || 0; if (current < need) { console.warn(`[SMC]: ${key} 不足,当前: ${current}, 需要: ${need}`); + oops.gui.toast(`${key} 不足,当前: ${current}, 需要: ${need}`) return false; } } - // 2) 统一扣减 for (const key in deductions) { if (!Object.prototype.hasOwnProperty.call(deductions, key)) continue; @@ -250,18 +282,32 @@ export class SingletonModuleComp extends ecs.Comp { this.data[key] = next; console.log(`[SMC]: 消耗游戏数据 ${key} = ${need}, 当前值: ${next}`); } - return true; } addItem(item_uuid:number,count:number,autoSave:boolean=true){ if(this.isWxClient()){ - this.gameDataSyncManager.addItem(item_uuid,count); - } - else{ - this.items[item_uuid] = (this.items[item_uuid] || 0) + count; + if(this.gameDataSyncManager.addItem(item_uuid,count)){ + this.items[item_uuid] = (this.items[item_uuid] || 0) + count; + return true + } + return false } + this.items[item_uuid] = (this.items[item_uuid] || 0) + count; + return true } + spendItem(item_uuid:number,count:number,autoSave:boolean=true){ + if(this.isWxClient()){ + if(this.gameDataSyncManager.consumeItem(item_uuid,count)){ + this.items[item_uuid] = (this.items[item_uuid] || 0) - count; + return true + } + return false + } + this.items[item_uuid] = (this.items[item_uuid] || 0) - count; + return true + } + } diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 4c8148dd..ee45b1d9 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -1,6 +1,7 @@ import { v3 } from "cc" import { FacSet, QualitySet } from "./BoxSet" import { smc } from "../SingletonModuleComp" +import { Items } from "./Items" /** * kind :1:烈焰 2:寒冰 3:自然 4:暗影 5:神圣 **/ @@ -30,7 +31,19 @@ export enum HType { remote = 1, mage = 2, } - +/** + * 解锁英雄所需物品 + * 绿色:铜钥匙*100 item:1006 num:100 + * 蓝色:银钥匙*200 item:1007 num:200 + * 紫色:金钥匙*100 item:1008 num:100 + * 橙色:金钥匙*100 item:1009 num:100 + */ +export const unlockHeroCost={ + [QualitySet.GREEN]:{i_uuid:Items[1006].uuid,num:100}, + [QualitySet.BLUE]:{i_uuid:Items[1006].uuid,num:200}, + [QualitySet.PURPLE]:{i_uuid:Items[1007].uuid,num:100}, + [QualitySet.ORANGE]:{i_uuid:Items[1008].uuid,num:100}, +} //fac:FacSet.HERO export const getHeroList = (quality:number=0)=>{ const filteredHeros = Object.values(HeroInfo).filter(item=>{ diff --git a/assets/script/game/map/GoodsComp.ts b/assets/script/game/map/GoodsComp.ts index 1f27ecf9..a3544c3e 100644 --- a/assets/script/game/map/GoodsComp.ts +++ b/assets/script/game/map/GoodsComp.ts @@ -98,8 +98,16 @@ export class GoodsComp extends Component { }else if(this.goodsData.c_type==CType.FREE){ this.do_free() }else if(this.goodsData.c_type==CType.DIAMOND){ + if(smc.data.diamond { - hero.getComponent(Animation).addClip(clip); - hero.getComponent(Animation).play("idle"); + this.node.getChildByName("hero").getComponent(Animation).addClip(clip); + this.node.getChildByName("hero").getComponent(Animation).play("idle"); }); this.node.getChildByName("name").getComponent(Label).string=hero_data.name this.node.getChildByName("lv").getChildByName("num").getComponent(Label).string=lv.toString() - this.node.getChildByName("skills").getChildByName("list2").getChildByName("luck").active= lv <5 - this.node.getChildByName("skills").getChildByName("list3").getChildByName("luck").active= lv <10 - this.node.getChildByName("skills").getChildByName("list4").getChildByName("luck").active= lv <15 + this.node.getChildByName("skills").getChildByName("list2").getChildByName("lock").active= lv <5 + this.node.getChildByName("skills").getChildByName("list3").getChildByName("lock").active= lv <10 + this.node.getChildByName("skills").getChildByName("list4").getChildByName("lock").active= lv <15 let {hp,ap,def}=getHeroStatsByLevel(uuid,lv) this.node.getChildByName("info").getChildByName("hp").getChildByName("num").getComponent(Label).string=hp.toString() this.node.getChildByName("info").getChildByName("ap").getChildByName("num").getComponent(Label).string=ap.toString() @@ -48,7 +48,7 @@ export class HInfoComp extends Component { this.node.getChildByName("type").getChildByName("w").active=hero_data.type==HType.warrior this.node.getChildByName("type").getChildByName("r").active=hero_data.type==HType.remote this.node.getChildByName("type").getChildByName("m").active=hero_data.type==HType.mage - this.show_luck(smc.heros[uuid]?.lv??0) + this.show_lock(smc.heros[uuid]?.lv??0) } updata_need(experience:number,gold:number){ let need_node=this.node.getChildByName("upNeed").getChildByName("need") @@ -57,29 +57,62 @@ export class HInfoComp extends Component { need_node.getChildByName("exp").getChildByName("has").getComponent(Label).string=NumberFormatter.formatNumber(smc.data.exp) need_node.getChildByName("gold").getChildByName("has").getComponent(Label).string=NumberFormatter.formatNumber(smc.data.gold) } - show_luck(lv:number){ + show_lock(lv:number){ this.node.getChildByName("upBtn").active=lv > 0 this.node.getChildByName("upNeed").active=lv > 0 - this.node.getChildByName("luck").active=lv == 0 + this.node.getChildByName("lock").active=lv == 0 + this.node.getChildByName("unLock").active=lv == 0 + let need_item=unlockHeroCost[HeroInfo[this.h_uuid].quality] + console.log("[HInfoComp]:show_lock item:item_uuid:hero_uuid:hero_data",Items[need_item.i_uuid],need_item.i_uuid,this.h_uuid,HeroInfo[this.h_uuid]) + + this.node.getChildByName("unLockNeed").getChildByName("need").getChildByName("has").getComponent(Label).string=smc.items[need_item.i_uuid]??0 + this.node.getChildByName("unLockNeed").getChildByName("need").getChildByName("need").getComponent(Label).string=NumberFormatter.formatNumber(need_item.num) + let path="gui/items/"+Items[need_item.i_uuid].path + resources.load(path,SpriteFrame, (err, clip) => { + this.node.getChildByName("unLockNeed").getChildByName("need").getChildByName("icon").getComponent(Sprite).spriteFrame=clip + }); + this.node.getChildByName("unLockNeed").active=lv == 0 + } + uplockhero(){ + let need_item=unlockHeroCost[HeroInfo[this.h_uuid].quality] + if(!smc.items[need_item.i_uuid]||smc.items[need_item.i_uuid]解锁失败") + return + } + oops.gui.toast("英雄< "+HeroInfo[this.h_uuid].name+" >解锁成功") + this.update_data(this.h_uuid) + oops.message.dispatchEvent(GameEvent.UpdateHero, {uuid:this.h_uuid}) } uplevel(){ let lv=smc.heros[this.h_uuid].lv let {experience,gold}=getUpgradeResources(lv) - if(smc.data.exp<=experience||smc.data.gold<=gold){ + if(smc.data.exp升级成功`) + oops.message.dispatchEvent(GameEvent.UpdateHero, {uuid:this.h_uuid}) + } next_hero(){ let heros=getHeroList() diff --git a/assets/script/game/wx_clound_client_api/USAGE.md b/assets/script/game/wx_clound_client_api/USAGE.md index c7c261f0..ffbe9ee5 100644 --- a/assets/script/game/wx_clound_client_api/USAGE.md +++ b/assets/script/game/wx_clound_client_api/USAGE.md @@ -446,3 +446,4 @@ export class GameDataManager { + diff --git a/assets/script/game/wx_clound_client_api/WxCloudApi.ts b/assets/script/game/wx_clound_client_api/WxCloudApi.ts index 2c492846..d421d8c4 100644 --- a/assets/script/game/wx_clound_client_api/WxCloudApi.ts +++ b/assets/script/game/wx_clound_client_api/WxCloudApi.ts @@ -224,8 +224,8 @@ export class WxCloudApi{ * @param amount 消耗的数量 * @return Promise>> */ - public static async spendGameDataField(field:string, amount: number): Promise, amount: number): Promise, old_value: number, new_value: number, change: number @@ -529,7 +529,7 @@ export class WxCloudApi{ * @param levels 升级级数(默认1级) * @return Promise>> */ - public static async levelUpHero(heroId: number, exp:number,gold:number,levels: number = 1): Promise