From d67c63b768e03f7290a9ec6405d0a77e6f4cb6b5 Mon Sep 17 00:00:00 2001 From: panw Date: Mon, 20 Oct 2025 16:53:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(gui):=20=E4=BC=98=E5=8C=96role=5Fcontr?= =?UTF-8?q?oller.prefab=E7=BB=93=E6=9E=84=E5=92=8C=E8=A7=86=E8=A7=89?= =?UTF-8?q?=E8=A1=A8=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整多个组件的__id__以规范资源引用 - 修改部分节点名称以提升可读性和管理 - 优化节点的位置、旋转和缩放参数 - 更新Sprite和Label组件的颜色及资源关联 - 替换部分SpriteFrame资源,提高图像清晰度 - 修改UITransform尺寸和锚点以匹配设计需求 - 添加新的Animation和Widget组件,完善动画与布局 - 调整光源节点的变换参数以改善光照效果 - 清理和重组节点层次结构,简化子节点管理 - 改进字体样式及视觉表现,符合设计规范 --- assets/resources/gui/role_controller.prefab | 1428 +++++++++++++++---- assets/script/game/map/HInfoComp.ts | 68 +- 2 files changed, 1235 insertions(+), 261 deletions(-) diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index eeb51644..c5c352f0 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -25,29 +25,29 @@ "__id__": 53 }, { - "__id__": 276 + "__id__": 322 }, { - "__id__": 304 + "__id__": 350 } ], "_active": true, "_components": [ { - "__id__": 350 + "__id__": 396 }, { - "__id__": 352 + "__id__": 398 }, { - "__id__": 354 + "__id__": 400 }, { - "__id__": 356 + "__id__": 402 } ], "_prefab": { - "__id__": 358 + "__id__": 404 }, "_lpos": { "__type__": "cc.Vec3", @@ -1242,20 +1242,20 @@ "_active": true, "_components": [ { - "__id__": 267 + "__id__": 313 }, { - "__id__": 269 + "__id__": 315 }, { - "__id__": 271 + "__id__": 317 }, { - "__id__": 273 + "__id__": 319 } ], "_prefab": { - "__id__": 275 + "__id__": 321 }, "_lpos": { "__type__": "cc.Vec3", @@ -5583,26 +5583,35 @@ "__id__": 232 }, { - "__id__": 238 - } - ], - "_active": true, - "_components": [ - { - "__id__": 258 + "__id__": 242 }, { - "__id__": 260 + "__id__": 252 }, { "__id__": 262 }, { - "__id__": 264 + "__id__": 272 + }, + { + "__id__": 282 + }, + { + "__id__": 288 + } + ], + "_active": true, + "_components": [ + { + "__id__": 308 + }, + { + "__id__": 310 } ], "_prefab": { - "__id__": 266 + "__id__": 312 }, "_lpos": { "__type__": "cc.Vec3", @@ -5619,7 +5628,7 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -5635,7 +5644,7 @@ }, { "__type__": "cc.Node", - "_name": "light", + "_name": "Node", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -5649,10 +5658,1005 @@ }, { "__id__": 235 + }, + { + "__id__": 237 + }, + { + "__id__": 239 } ], "_prefab": { - "__id__": 237 + "__id__": 241 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -108.93, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.8, + "y": 0.8, + "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__": 232 + }, + "_enabled": true, + "__prefab": { + "__id__": 234 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cewibQgK1ALbFhMuuspMmN" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 232 + }, + "_enabled": true, + "__prefab": { + "__id__": 236 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9e5ec114-01a4-47d3-b7b7-df3b90209c91@6ce90", + "__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": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ed71tIQFtJtbSwrQYOmOPP" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 232 + }, + "_enabled": true, + "__prefab": { + "__id__": 238 + }, + "playOnLoad": true, + "_clips": [], + "_defaultClip": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dBJqUbmFPGIhxjbVKe/vR" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 232 + }, + "_enabled": false, + "__prefab": { + "__id__": 240 + }, + "_alignFlags": 18, + "_target": null, + "_left": 180.8, + "_right": 180.8, + "_top": 460.8, + "_bottom": 450, + "_horizontalCenter": 0, + "_verticalCenter": 160, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "bbvPKZM+VNTrQG0iMfRGDW" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9anvHdhj5D1opINsPLBLgs", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Node1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 231 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 243 + }, + { + "__id__": 245 + }, + { + "__id__": 247 + }, + { + "__id__": 249 + } + ], + "_prefab": { + "__id__": 251 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 250, + "y": -108.93, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.8, + "y": 0.8, + "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__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 244 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0bOzXim85Nrqdu6emwVWrd" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 246 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9e5ec114-01a4-47d3-b7b7-df3b90209c91@6ce90", + "__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": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8cSo8eD4NA4rfgphTdy9eR" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 248 + }, + "playOnLoad": true, + "_clips": [], + "_defaultClip": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7HQlCCfZBrqa1bIx/lWAx" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": false, + "__prefab": { + "__id__": 250 + }, + "_alignFlags": 18, + "_target": null, + "_left": 180.8, + "_right": 180.8, + "_top": 460.8, + "_bottom": 450, + "_horizontalCenter": 0, + "_verticalCenter": 160, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "98oVY+B55MwLBpCxBZ7LV+" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4cpK6SwURGcb6CS1ipzSlk", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Node2", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 231 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 253 + }, + { + "__id__": 255 + }, + { + "__id__": 257 + }, + { + "__id__": 259 + } + ], + "_prefab": { + "__id__": 261 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 125, + "y": -108.93, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.8, + "y": 0.8, + "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__": 252 + }, + "_enabled": true, + "__prefab": { + "__id__": 254 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "05ik20FAJFoo/Oluh7gcfx" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 252 + }, + "_enabled": true, + "__prefab": { + "__id__": 256 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9e5ec114-01a4-47d3-b7b7-df3b90209c91@6ce90", + "__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": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "adrozLaepIqK0dIXHT2E15" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 252 + }, + "_enabled": true, + "__prefab": { + "__id__": 258 + }, + "playOnLoad": true, + "_clips": [], + "_defaultClip": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "77AJkLfwBNMpQwYcyn+mkn" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 252 + }, + "_enabled": false, + "__prefab": { + "__id__": 260 + }, + "_alignFlags": 18, + "_target": null, + "_left": 180.8, + "_right": 180.8, + "_top": 460.8, + "_bottom": 450, + "_horizontalCenter": 0, + "_verticalCenter": 160, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "195CIKEVNOLpbeqxNY3dmd" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "497txozZlFuJ+xZxTO7CcX", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Node3", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 231 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 263 + }, + { + "__id__": 265 + }, + { + "__id__": 267 + }, + { + "__id__": 269 + } + ], + "_prefab": { + "__id__": 271 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -125, + "y": -108.93, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.8, + "y": 0.8, + "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__": 262 + }, + "_enabled": true, + "__prefab": { + "__id__": 264 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "757fOqqcNJaZS7F87kpuPI" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 262 + }, + "_enabled": true, + "__prefab": { + "__id__": 266 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9e5ec114-01a4-47d3-b7b7-df3b90209c91@6ce90", + "__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": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5daoPyEdJMBpgiTsNNEXWY" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 262 + }, + "_enabled": true, + "__prefab": { + "__id__": 268 + }, + "playOnLoad": true, + "_clips": [], + "_defaultClip": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f4mUEcealHTp4qH7rlJ4w4" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 262 + }, + "_enabled": false, + "__prefab": { + "__id__": 270 + }, + "_alignFlags": 18, + "_target": null, + "_left": 180.8, + "_right": 180.8, + "_top": 460.8, + "_bottom": 450, + "_horizontalCenter": 0, + "_verticalCenter": 160, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c21MPmhC5BkIu0vp+C1yaN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4ehoNUbBZHbrQBMGxgZGnP", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Node4", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 231 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 273 + }, + { + "__id__": 275 + }, + { + "__id__": 277 + }, + { + "__id__": 279 + } + ], + "_prefab": { + "__id__": 281 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -250, + "y": -108.93, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.8, + "y": 0.8, + "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__": 272 + }, + "_enabled": true, + "__prefab": { + "__id__": 274 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "05WGCOyctCk7eRkzpOcKtN" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 272 + }, + "_enabled": true, + "__prefab": { + "__id__": 276 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9e5ec114-01a4-47d3-b7b7-df3b90209c91@6ce90", + "__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": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "adqojmTF5Nor6HRX4k6zTx" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 272 + }, + "_enabled": true, + "__prefab": { + "__id__": 278 + }, + "playOnLoad": true, + "_clips": [], + "_defaultClip": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "85U9D7V5ZE4JU/AJ9OPk8w" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 272 + }, + "_enabled": false, + "__prefab": { + "__id__": 280 + }, + "_alignFlags": 18, + "_target": null, + "_left": 180.8, + "_right": 180.8, + "_top": 460.8, + "_bottom": 450, + "_horizontalCenter": 0, + "_verticalCenter": 160, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "48L6Fjp11IJad25Nrjuplt" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b24JojnI9Jarep64hb5wSB", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "light", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 231 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 283 + }, + { + "__id__": 285 + } + ], + "_prefab": { + "__id__": 287 }, "_lpos": { "__type__": "cc.Vec3", @@ -5662,10 +6666,10 @@ }, "_lrot": { "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 1, - "w": 0 + "x": 6.123233995736766e-17, + "y": 6.123233995736766e-17, + "z": -1, + "w": 3.749399456654644e-33 }, "_lscale": { "__type__": "cc.Vec3", @@ -5689,11 +6693,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 232 + "__id__": 282 }, "_enabled": true, "__prefab": { - "__id__": 234 + "__id__": 284 }, "_contentSize": { "__type__": "cc.Size", @@ -5717,11 +6721,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 232 + "__id__": 282 }, "_enabled": true, "__prefab": { - "__id__": 236 + "__id__": 286 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5782,23 +6786,23 @@ }, "_children": [ { - "__id__": 239 + "__id__": 289 }, { - "__id__": 247 + "__id__": 297 } ], "_active": true, "_components": [ { - "__id__": 253 + "__id__": 303 }, { - "__id__": 255 + "__id__": 305 } ], "_prefab": { - "__id__": 257 + "__id__": 307 }, "_lpos": { "__type__": "cc.Vec3", @@ -5815,7 +6819,7 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -5835,23 +6839,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 238 + "__id__": 288 }, "_children": [], "_active": true, "_components": [ { - "__id__": 240 + "__id__": 290 }, { - "__id__": 242 + "__id__": 292 }, { - "__id__": 244 + "__id__": 294 } ], "_prefab": { - "__id__": 246 + "__id__": 296 }, "_lpos": { "__type__": "cc.Vec3", @@ -5888,11 +6892,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 239 + "__id__": 289 }, "_enabled": true, "__prefab": { - "__id__": 241 + "__id__": 291 }, "_contentSize": { "__type__": "cc.Size", @@ -5916,11 +6920,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 239 + "__id__": 289 }, "_enabled": true, "__prefab": { - "__id__": 243 + "__id__": 293 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5984,11 +6988,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 239 + "__id__": 289 }, "_enabled": true, "__prefab": { - "__id__": 245 + "__id__": 295 }, "_alignFlags": 1, "_target": null, @@ -6033,20 +7037,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 238 + "__id__": 288 }, "_children": [], "_active": true, "_components": [ { - "__id__": 248 + "__id__": 298 }, { - "__id__": 250 + "__id__": 300 } ], "_prefab": { - "__id__": 252 + "__id__": 302 }, "_lpos": { "__type__": "cc.Vec3", @@ -6083,11 +7087,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 247 + "__id__": 297 }, "_enabled": true, "__prefab": { - "__id__": 249 + "__id__": 299 }, "_contentSize": { "__type__": "cc.Size", @@ -6111,11 +7115,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 247 + "__id__": 297 }, "_enabled": true, "__prefab": { - "__id__": 251 + "__id__": 301 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6192,11 +7196,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 238 + "__id__": 288 }, "_enabled": true, "__prefab": { - "__id__": 254 + "__id__": 304 }, "_contentSize": { "__type__": "cc.Size", @@ -6220,11 +7224,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 238 + "__id__": 288 }, "_enabled": true, "__prefab": { - "__id__": 256 + "__id__": 306 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6285,7 +7289,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 259 + "__id__": 309 }, "_contentSize": { "__type__": "cc.Size", @@ -6303,72 +7307,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "4be4ucTplO1LpzEBua5Rde" }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 231 - }, - "_enabled": true, - "__prefab": { - "__id__": 261 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "9e5ec114-01a4-47d3-b7b7-df3b90209c91@6ce90", - "__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": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "adp+p/S4ZNhZrkdN80wVui" - }, - { - "__type__": "cc.Animation", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 231 - }, - "_enabled": true, - "__prefab": { - "__id__": 263 - }, - "playOnLoad": true, - "_clips": [], - "_defaultClip": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "dbiFfJVHVCu6rHpcpMTXrT" - }, { "__type__": "cc.Widget", "_name": "", @@ -6379,7 +7317,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 265 + "__id__": 311 }, "_alignFlags": 18, "_target": null, @@ -6428,7 +7366,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 268 + "__id__": 314 }, "_contentSize": { "__type__": "cc.Size", @@ -6456,7 +7394,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 270 + "__id__": 316 }, "_alignFlags": 21, "_target": null, @@ -6492,7 +7430,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 272 + "__id__": 318 }, "_id": "" }, @@ -6510,7 +7448,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 274 + "__id__": 320 }, "_id": "" }, @@ -6541,26 +7479,26 @@ }, "_children": [ { - "__id__": 277 + "__id__": 323 }, { - "__id__": 285 + "__id__": 331 } ], "_active": false, "_components": [ { - "__id__": 297 + "__id__": 343 }, { - "__id__": 299 + "__id__": 345 }, { - "__id__": 301 + "__id__": 347 } ], "_prefab": { - "__id__": 303 + "__id__": 349 }, "_lpos": { "__type__": "cc.Vec3", @@ -6597,23 +7535,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 276 + "__id__": 322 }, "_children": [], "_active": true, "_components": [ { - "__id__": 278 + "__id__": 324 }, { - "__id__": 280 + "__id__": 326 }, { - "__id__": 282 + "__id__": 328 } ], "_prefab": { - "__id__": 284 + "__id__": 330 }, "_lpos": { "__type__": "cc.Vec3", @@ -6650,11 +7588,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 277 + "__id__": 323 }, "_enabled": true, "__prefab": { - "__id__": 279 + "__id__": 325 }, "_contentSize": { "__type__": "cc.Size", @@ -6678,11 +7616,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 277 + "__id__": 323 }, "_enabled": true, "__prefab": { - "__id__": 281 + "__id__": 327 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6726,11 +7664,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 277 + "__id__": 323 }, "_enabled": true, "__prefab": { - "__id__": 283 + "__id__": 329 }, "_alignFlags": 45, "_target": null, @@ -6773,17 +7711,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 276 + "__id__": 322 }, "_prefab": { - "__id__": 286 + "__id__": 332 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 285 + "__id__": 331 }, "asset": { "__uuid__": "9cc71d8c-192a-4234-8204-352f42b95c65", @@ -6791,7 +7729,7 @@ }, "fileId": "a0daVw8DRLi6ToMaTA0VS2", "instance": { - "__id__": 287 + "__id__": 333 }, "targetOverrides": null }, @@ -6805,22 +7743,22 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 288 + "__id__": 334 }, { - "__id__": 290 + "__id__": 336 }, { - "__id__": 291 + "__id__": 337 }, { - "__id__": 292 + "__id__": 338 }, { - "__id__": 293 + "__id__": 339 }, { - "__id__": 295 + "__id__": 341 } ], "removedComponents": [] @@ -6828,7 +7766,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 289 + "__id__": 335 }, "propertyPath": [ "_name" @@ -6844,7 +7782,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 289 + "__id__": 335 }, "propertyPath": [ "_lpos" @@ -6859,7 +7797,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 289 + "__id__": 335 }, "propertyPath": [ "_lrot" @@ -6875,7 +7813,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 289 + "__id__": 335 }, "propertyPath": [ "_euler" @@ -6890,7 +7828,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 294 + "__id__": 340 }, "propertyPath": [ "_contentSize" @@ -6910,7 +7848,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 296 + "__id__": 342 }, "propertyPath": [ "_contentSize" @@ -6933,11 +7871,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 276 + "__id__": 322 }, "_enabled": true, "__prefab": { - "__id__": 298 + "__id__": 344 }, "_contentSize": { "__type__": "cc.Size", @@ -6961,11 +7899,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 276 + "__id__": 322 }, "_enabled": true, "__prefab": { - "__id__": 300 + "__id__": 346 }, "_alignFlags": 45, "_target": null, @@ -6997,11 +7935,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 276 + "__id__": 322 }, "_enabled": true, "__prefab": { - "__id__": 302 + "__id__": 348 }, "_id": "" }, @@ -7032,23 +7970,23 @@ }, "_children": [ { - "__id__": 305 + "__id__": 351 } ], "_active": true, "_components": [ { - "__id__": 343 + "__id__": 389 }, { - "__id__": 345 + "__id__": 391 }, { - "__id__": 347 + "__id__": 393 } ], "_prefab": { - "__id__": 349 + "__id__": 395 }, "_lpos": { "__type__": "cc.Vec3", @@ -7085,30 +8023,30 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 304 + "__id__": 350 }, "_children": [ { - "__id__": 306 + "__id__": 352 } ], "_active": true, "_components": [ { - "__id__": 334 + "__id__": 380 }, { - "__id__": 336 + "__id__": 382 }, { - "__id__": 338 + "__id__": 384 }, { - "__id__": 340 + "__id__": 386 } ], "_prefab": { - "__id__": 342 + "__id__": 388 }, "_lpos": { "__type__": "cc.Vec3", @@ -7145,27 +8083,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 305 + "__id__": 351 }, "_children": [ { - "__id__": 307 + "__id__": 353 }, { - "__id__": 315 + "__id__": 361 }, { - "__id__": 321 + "__id__": 367 } ], "_active": true, "_components": [ { - "__id__": 331 + "__id__": 377 } ], "_prefab": { - "__id__": 333 + "__id__": 379 }, "_lpos": { "__type__": "cc.Vec3", @@ -7202,23 +8140,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 306 + "__id__": 352 }, "_children": [], "_active": true, "_components": [ { - "__id__": 308 + "__id__": 354 }, { - "__id__": 310 + "__id__": 356 }, { - "__id__": 312 + "__id__": 358 } ], "_prefab": { - "__id__": 314 + "__id__": 360 }, "_lpos": { "__type__": "cc.Vec3", @@ -7255,11 +8193,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 307 + "__id__": 353 }, "_enabled": true, "__prefab": { - "__id__": 309 + "__id__": 355 }, "_contentSize": { "__type__": "cc.Size", @@ -7283,11 +8221,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 307 + "__id__": 353 }, "_enabled": true, "__prefab": { - "__id__": 311 + "__id__": 357 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -7331,11 +8269,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 307 + "__id__": 353 }, "_enabled": true, "__prefab": { - "__id__": 313 + "__id__": 359 }, "_alignFlags": 40, "_target": null, @@ -7380,20 +8318,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 306 + "__id__": 352 }, "_children": [], "_active": true, "_components": [ { - "__id__": 316 + "__id__": 362 }, { - "__id__": 318 + "__id__": 364 } ], "_prefab": { - "__id__": 320 + "__id__": 366 }, "_lpos": { "__type__": "cc.Vec3", @@ -7430,11 +8368,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 315 + "__id__": 361 }, "_enabled": true, "__prefab": { - "__id__": 317 + "__id__": 363 }, "_contentSize": { "__type__": "cc.Size", @@ -7458,11 +8396,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 315 + "__id__": 361 }, "_enabled": true, "__prefab": { - "__id__": 319 + "__id__": 365 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -7519,26 +8457,26 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 306 + "__id__": 352 }, "_children": [], "_active": true, "_components": [ { - "__id__": 322 + "__id__": 368 }, { - "__id__": 324 + "__id__": 370 }, { - "__id__": 326 + "__id__": 372 }, { - "__id__": 328 + "__id__": 374 } ], "_prefab": { - "__id__": 330 + "__id__": 376 }, "_lpos": { "__type__": "cc.Vec3", @@ -7575,11 +8513,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 321 + "__id__": 367 }, "_enabled": true, "__prefab": { - "__id__": 323 + "__id__": 369 }, "_contentSize": { "__type__": "cc.Size", @@ -7603,11 +8541,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 321 + "__id__": 367 }, "_enabled": true, "__prefab": { - "__id__": 325 + "__id__": 371 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -7671,11 +8609,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 321 + "__id__": 367 }, "_enabled": true, "__prefab": { - "__id__": 327 + "__id__": 373 }, "_alignFlags": 10, "_target": null, @@ -7707,11 +8645,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 321 + "__id__": 367 }, "_enabled": true, "__prefab": { - "__id__": 329 + "__id__": 375 }, "templateMode": true, "watchPath": "data.data.gold", @@ -7744,11 +8682,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 306 + "__id__": 352 }, "_enabled": true, "__prefab": { - "__id__": 332 + "__id__": 378 }, "_contentSize": { "__type__": "cc.Size", @@ -7785,11 +8723,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 305 + "__id__": 351 }, "_enabled": true, "__prefab": { - "__id__": 335 + "__id__": 381 }, "_contentSize": { "__type__": "cc.Size", @@ -7813,11 +8751,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 305 + "__id__": 351 }, "_enabled": true, "__prefab": { - "__id__": 337 + "__id__": 383 }, "_alignFlags": 8, "_target": null, @@ -7849,11 +8787,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 305 + "__id__": 351 }, "_enabled": true, "__prefab": { - "__id__": 339 + "__id__": 385 }, "_resizeMode": 0, "_layoutType": 1, @@ -7887,11 +8825,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 305 + "__id__": 351 }, "_enabled": true, "__prefab": { - "__id__": 341 + "__id__": 387 }, "_alignFlags": 40, "_target": null, @@ -7936,11 +8874,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 304 + "__id__": 350 }, "_enabled": true, "__prefab": { - "__id__": 344 + "__id__": 390 }, "_contentSize": { "__type__": "cc.Size", @@ -7964,11 +8902,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 304 + "__id__": 350 }, "_enabled": true, "__prefab": { - "__id__": 346 + "__id__": 392 }, "_alignFlags": 17, "_target": null, @@ -8000,11 +8938,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 304 + "__id__": 350 }, "_enabled": true, "__prefab": { - "__id__": 348 + "__id__": 394 }, "_id": "" }, @@ -8035,7 +8973,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 351 + "__id__": 397 }, "_contentSize": { "__type__": "cc.Size", @@ -8063,7 +9001,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 353 + "__id__": 399 }, "_alignFlags": 45, "_target": null, @@ -8099,7 +9037,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 355 + "__id__": 401 }, "_id": "" }, @@ -8117,7 +9055,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 357 + "__id__": 403 }, "_id": "" }, @@ -8138,7 +9076,7 @@ "targetOverrides": [], "nestedPrefabInstanceRoots": [ { - "__id__": 285 + "__id__": 331 } ] } diff --git a/assets/script/game/map/HInfoComp.ts b/assets/script/game/map/HInfoComp.ts index afbcf9b2..58899962 100644 --- a/assets/script/game/map/HInfoComp.ts +++ b/assets/script/game/map/HInfoComp.ts @@ -1,4 +1,4 @@ -import { _decorator, Animation, AnimationClip, Component, Label, Node, resources, Sprite, SpriteFrame } from 'cc'; +import { _decorator, Animation, AnimationClip, Component, instantiate, Label, Node, Prefab, resources, Sprite, SpriteFrame, v3 } from 'cc'; import { oops } from 'db://oops-framework/core/Oops'; import { getHeroList, HeroInfo, HType, HTypeName } from '../common/config/heroSet'; import { smc } from '../common/SingletonModuleComp'; @@ -12,6 +12,24 @@ export class HInfoComp extends Component { ap_node:any=null hp_node:any=null def_node:any=null + // 重新定义节点映射,使名称更清晰 + // 当前显示的英雄节点数组(7个位置) + heroNodes: (Node | null)[] = [null, null, null, null, null, null, null]; + + // 英雄位置定义 + hero_pos:any={ + 0:v3(420,-109,0), // 不在屏幕内 + 1:v3(280,-109,0), + 2:v3(140,-109,0), + 3:v3(0,-109,0), + 4:v3(-140,-109,0), + 5:v3(-280,-109,0), + 6:v3(-420,-109,0), // 不在屏幕内 + } + + // 位置索引常量 + private static center_pos = 3; + start() { this.name_node=this.node.getChildByName("hero").getChildByName("hname").getChildByName("name") this.type_node=this.node.getChildByName("hero").getChildByName("hname").getChildByName("type") @@ -26,19 +44,39 @@ export class HInfoComp extends Component { } update_data(uuid:number){ this.h_uuid=uuid - let hero_data = HeroInfo[uuid] - console.log("[HInfoComp]:update_data",uuid,hero_data,this.node) - this.name_node.getComponent(Label).string=hero_data.name - this.type_node.getComponent(Label).string=HTypeName[hero_data.type] - this.ap_node.getComponent(Label).string=hero_data.ap.toString() - this.hp_node.getComponent(Label).string=hero_data.hp.toString() - this.def_node.getComponent(Label).string=hero_data.def.toString() - let anm_path=hero_data.path - resources.load("game/heros/hero/"+anm_path+"/idle", AnimationClip, (err, clip) => { - this.node.getChildByName("hero").getComponent(Animation).addClip(clip); - this.node.getChildByName("hero").getComponent(Animation).play("idle"); - }); + console.log("[HInfoComp]:update_data",uuid,HeroInfo[uuid],this.node) + this.name_node.getComponent(Label).string=HeroInfo[uuid].name + this.type_node.getComponent(Label).string=HTypeName[HeroInfo[uuid].type] + this.ap_node.getComponent(Label).string=HeroInfo[uuid].ap.toString() + this.hp_node.getComponent(Label).string=HeroInfo[uuid].hp.toString() + this.def_node.getComponent(Label).string=HeroInfo[uuid].def.toString() + this.load_all_hero(uuid) } + load_all_hero(uuid:number){ + + } + load_hui(uuid:number,pos_index: number){ + var path = "game/heros/"+HeroInfo[uuid].path; + var prefab: Prefab = oops.res.get(path, Prefab)!; + var node = instantiate(prefab); + HeroInfo[uuid] + let anm_path=HeroInfo[uuid].path + resources.load("game/heros/hero/"+anm_path+"/idle", AnimationClip, (err, clip) => { + node.getComponent(Animation).addClip(clip); + node.getComponent(Animation).play("idle"); + }); + node.setPosition(this.hero_pos[pos_index]) + } + + claear_hero(){ + for (let i = 0; i < this.heroNodes.length; i++) { + if (this.heroNodes[i]) { + this.heroNodes[i].destroy(); + this.heroNodes[i] = null; + } + } + } + next_hero(){ let heros=getHeroList() let index = heros.indexOf(this.h_uuid); @@ -61,6 +99,4 @@ export class HInfoComp extends Component { reset() { this.node.destroy() } -} - - +} \ No newline at end of file