From 8a55f7433bbc2ea427372bb39664ff407a94b36b Mon Sep 17 00:00:00 2001 From: walkpan Date: Wed, 18 Mar 2026 22:53:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=8B=B1=E9=9B=84):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=8B=B1=E9=9B=84=E6=A8=A1=E5=9E=8B=E7=BC=A9=E6=94=BE=E3=80=81?= =?UTF-8?q?=E8=A1=80=E6=9D=A1=E4=BD=8D=E7=BD=AE=E5=92=8C=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A1=B6=E9=83=A8UI=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整多个英雄模型(mo1、mo2、ha1、hc1、hh1、hm1、hz1、hm2、mo3、hk1、mo4)的缩放比例(x轴从1改为0.7-0.8)和血条位置(y轴坐标) - 为英雄阵营单位设置绿色血条(#2ECC71)以区分阵营 - 禁用物理调试绘制以提升性能 - 优化顶部UI(top.prefab)的布局:调整位置、缩放、尺寸,使血条和能量条更紧凑 - 调整hm2英雄的碰撞框尺寸和位置 - 移除mo3和hk1英雄中不必要的UI元素覆盖 - 为mo4英雄添加骷髅图标并调整顶部UI位置和缩放 --- assets/resources/game/heros/ha1.prefab | 4 +- assets/resources/game/heros/hc1.prefab | 4 +- assets/resources/game/heros/hh1.prefab | 4 +- assets/resources/game/heros/hk1.prefab | 175 +------- assets/resources/game/heros/hm1.prefab | 4 +- assets/resources/game/heros/hm2.prefab | 10 +- assets/resources/game/heros/hz1.prefab | 4 +- assets/resources/game/heros/mo1.prefab | 2 +- assets/resources/game/heros/mo2.prefab | 2 +- assets/resources/game/heros/mo3.prefab | 150 +------ assets/resources/game/heros/mo4.prefab | 529 +++++++++++++----------- assets/resources/game/heros/top.prefab | 52 +-- assets/script/Main.ts | 2 +- assets/script/game/hero/HeroViewComp.ts | 3 + 14 files changed, 379 insertions(+), 566 deletions(-) diff --git a/assets/resources/game/heros/ha1.prefab b/assets/resources/game/heros/ha1.prefab index 628135ac..8ca5b966 100644 --- a/assets/resources/game/heros/ha1.prefab +++ b/assets/resources/game/heros/ha1.prefab @@ -698,7 +698,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 107.768, + "y": 127.867, "z": 0 } }, @@ -764,7 +764,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/hc1.prefab b/assets/resources/game/heros/hc1.prefab index 2c22a88b..1c4e8d34 100644 --- a/assets/resources/game/heros/hc1.prefab +++ b/assets/resources/game/heros/hc1.prefab @@ -580,7 +580,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 107.768, + "y": 124.879, "z": 0 } }, @@ -646,7 +646,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/hh1.prefab b/assets/resources/game/heros/hh1.prefab index 8f9b061a..67501972 100644 --- a/assets/resources/game/heros/hh1.prefab +++ b/assets/resources/game/heros/hh1.prefab @@ -580,7 +580,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 107.768, + "y": 136.623, "z": 0 } }, @@ -646,7 +646,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/hk1.prefab b/assets/resources/game/heros/hk1.prefab index cc8512ae..7c15f263 100644 --- a/assets/resources/game/heros/hk1.prefab +++ b/assets/resources/game/heros/hk1.prefab @@ -31,23 +31,23 @@ "_active": true, "_components": [ { - "__id__": 47 + "__id__": 35 }, { - "__id__": 49 + "__id__": 37 }, { - "__id__": 51 + "__id__": 39 }, { - "__id__": 53 + "__id__": 41 }, { - "__id__": 55 + "__id__": 43 } ], "_prefab": { - "__id__": 57 + "__id__": 45 }, "_lpos": { "__type__": "cc.Vec3", @@ -525,7 +525,7 @@ }, { "__type__": "cc.PrefabInstance", - "fileId": "69IAw7dThHvIlVtTfXOVMZ", + "fileId": "37dKfpew9GJKWvYU5wnkWd", "prefabRootNode": { "__id__": 1 }, @@ -546,24 +546,6 @@ }, { "__id__": 34 - }, - { - "__id__": 36 - }, - { - "__id__": 37 - }, - { - "__id__": 39 - }, - { - "__id__": 41 - }, - { - "__id__": 43 - }, - { - "__id__": 45 } ], "removedComponents": [] @@ -594,8 +576,8 @@ ], "value": { "__type__": "cc.Vec3", - "x": 0.251, - "y": 124.536, + "x": 0, + "y": 125.335, "z": 0 } }, @@ -630,27 +612,6 @@ "z": 0 } }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 35 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 10.531, - "z": 0 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "16MuhUBUpB2ZdBTYflEf1n" - ] - }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { @@ -661,117 +622,11 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 38 - }, - "propertyPath": [ - "_contentSize" - ], - "value": { - "__type__": "cc.Size", - "width": 100, - "height": 30 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "cdvV5hAkdEaY6AT6urHKuf" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 40 - }, - "propertyPath": [ - "_color" - ], - "value": { - "__type__": "cc.Color", - "r": 219, - "g": 212, - "b": 52, - "a": 255 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "63mCHH6lhNV7iIr3Lvf2gG" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 42 - }, - "propertyPath": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.7, - "y": 0.7, - "z": 1 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "894T590c9Nyr7Y3ok7yBrM" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 44 - }, - "propertyPath": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.7, - "y": 1, - "z": 1 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "4bGUhFXlZF/Jdkcq0HY9ai" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 46 - }, - "propertyPath": [ - "_color" - ], - "value": { - "__type__": "cc.Color", - "r": 0, - "g": 224, - "b": 9, - "a": 255 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "42Iqibz0VOArXYqoFJhNMf" - ] - }, { "__type__": "cc.UITransform", "_name": "", @@ -782,7 +637,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 48 + "__id__": 36 }, "_contentSize": { "__type__": "cc.Size", @@ -810,7 +665,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 50 + "__id__": 38 }, "anm": { "__id__": 5 @@ -831,7 +686,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 52 + "__id__": 40 }, "debugMode": false, "_id": "" @@ -850,7 +705,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 54 + "__id__": 42 }, "enabledContactListener": false, "bullet": false, @@ -884,7 +739,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 56 + "__id__": 44 }, "tag": 0, "_group": 4, diff --git a/assets/resources/game/heros/hm1.prefab b/assets/resources/game/heros/hm1.prefab index 67103a49..29224879 100644 --- a/assets/resources/game/heros/hm1.prefab +++ b/assets/resources/game/heros/hm1.prefab @@ -580,7 +580,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 107.768, + "y": 134.106, "z": 0 } }, @@ -646,7 +646,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/hm2.prefab b/assets/resources/game/heros/hm2.prefab index 8d3ae579..c61bf4ae 100644 --- a/assets/resources/game/heros/hm2.prefab +++ b/assets/resources/game/heros/hm2.prefab @@ -111,7 +111,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -35.876, + "y": -42.371, "z": 0 }, "_lrot": { @@ -151,8 +151,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 192, - "height": 192 + "width": 230.4, + "height": 230.4 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -580,7 +580,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 129.893, + "y": 137.358, "z": 0 } }, @@ -646,7 +646,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/hz1.prefab b/assets/resources/game/heros/hz1.prefab index 0fa7bb97..e98f4550 100644 --- a/assets/resources/game/heros/hz1.prefab +++ b/assets/resources/game/heros/hz1.prefab @@ -580,7 +580,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 107.768, + "y": 135.784, "z": 0 } }, @@ -646,7 +646,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/mo1.prefab b/assets/resources/game/heros/mo1.prefab index b2049b08..d0d5c39d 100644 --- a/assets/resources/game/heros/mo1.prefab +++ b/assets/resources/game/heros/mo1.prefab @@ -643,7 +643,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/mo2.prefab b/assets/resources/game/heros/mo2.prefab index ce5b71c6..a9e064c4 100644 --- a/assets/resources/game/heros/mo2.prefab +++ b/assets/resources/game/heros/mo2.prefab @@ -646,7 +646,7 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.7, "y": 1, "z": 1 } diff --git a/assets/resources/game/heros/mo3.prefab b/assets/resources/game/heros/mo3.prefab index f3d0020e..ae6a78f0 100644 --- a/assets/resources/game/heros/mo3.prefab +++ b/assets/resources/game/heros/mo3.prefab @@ -30,24 +30,24 @@ ], "_active": true, "_components": [ + { + "__id__": 35 + }, + { + "__id__": 37 + }, + { + "__id__": 39 + }, + { + "__id__": 41 + }, { "__id__": 43 - }, - { - "__id__": 45 - }, - { - "__id__": 47 - }, - { - "__id__": 49 - }, - { - "__id__": 51 } ], "_prefab": { - "__id__": 53 + "__id__": 45 }, "_lpos": { "__type__": "cc.Vec3", @@ -525,7 +525,7 @@ }, { "__type__": "cc.PrefabInstance", - "fileId": "69IAw7dThHvIlVtTfXOVMZ", + "fileId": "00h7eq0jlKdq/qkVTmoJpy", "prefabRootNode": { "__id__": 1 }, @@ -546,21 +546,6 @@ }, { "__id__": 34 - }, - { - "__id__": 36 - }, - { - "__id__": 37 - }, - { - "__id__": 39 - }, - { - "__id__": 41 - }, - { - "__id__": 42 } ], "removedComponents": [] @@ -592,7 +577,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 107.768, + "y": 130.12, "z": 0 } }, @@ -627,27 +612,6 @@ "z": 0 } }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 35 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 10.531, - "z": 0 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "16MuhUBUpB2ZdBTYflEf1n" - ] - }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { @@ -658,83 +622,11 @@ ], "value": { "__type__": "cc.Vec3", - "x": 1, + "x": 0.8, "y": 1, "z": 1 } }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 38 - }, - "propertyPath": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.6, - "y": 1, - "z": 1 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "4bGUhFXlZF/Jdkcq0HY9ai" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 40 - }, - "propertyPath": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.6, - "y": 1, - "z": 1 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "32HF124+5LVqGOnUmyAZ0q" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 40 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 8.969, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 38 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 8.969, - "z": 0 - } - }, { "__type__": "cc.UITransform", "_name": "", @@ -745,7 +637,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 44 + "__id__": 36 }, "_contentSize": { "__type__": "cc.Size", @@ -773,7 +665,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 46 + "__id__": 38 }, "anm": { "__id__": 5 @@ -794,7 +686,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 48 + "__id__": 40 }, "debugMode": false, "_id": "" @@ -813,7 +705,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 50 + "__id__": 42 }, "enabledContactListener": true, "bullet": false, @@ -847,7 +739,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 52 + "__id__": 44 }, "tag": 0, "_group": 4, diff --git a/assets/resources/game/heros/mo4.prefab b/assets/resources/game/heros/mo4.prefab index 5d33363d..9d440179 100644 --- a/assets/resources/game/heros/mo4.prefab +++ b/assets/resources/game/heros/mo4.prefab @@ -26,10 +26,16 @@ }, { "__id__": 26 + }, + { + "__id__": 43 } ], "_active": true, "_components": [ + { + "__id__": 52 + }, { "__id__": 54 }, @@ -41,13 +47,10 @@ }, { "__id__": 60 - }, - { - "__id__": 62 } ], "_prefab": { - "__id__": 64 + "__id__": 62 }, "_lpos": { "__type__": "cc.Vec3", @@ -525,69 +528,200 @@ }, { "__type__": "cc.PrefabInstance", - "fileId": "69IAw7dThHvIlVtTfXOVMZ", + "fileId": "f4ModMncVDMrUHuqBiagGP", "prefabRootNode": { "__id__": 1 }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ + "mountedChildren": [ { "__id__": 29 - }, - { - "__id__": 31 - }, - { - "__id__": 32 - }, - { - "__id__": 33 - }, - { - "__id__": 34 - }, - { - "__id__": 36 - }, + } + ], + "mountedComponents": [], + "propertyOverrides": [ { "__id__": 37 }, { "__id__": 39 }, + { + "__id__": 40 + }, { "__id__": 41 }, { - "__id__": 43 - }, - { - "__id__": 45 - }, - { - "__id__": 47 - }, - { - "__id__": 49 - }, - { - "__id__": 51 - }, - { - "__id__": 52 - }, - { - "__id__": 53 + "__id__": 42 } ], "removedComponents": [] }, { - "__type__": "CCPropertyOverrideInfo", + "__type__": "cc.MountedChildrenInfo", "targetInfo": { "__id__": 30 }, + "nodes": [ + { + "__id__": 31 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "5fqU0L3/FOhKaco5UkHuWT" + ] + }, + { + "__type__": "cc.Node", + "_name": "ItemIcon_Skull_Boss_Red", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 26 + } + }, + "_parent": { + "__id__": 26 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + }, + { + "__id__": 34 + } + ], + "_prefab": { + "__id__": 36 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5.735, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 0.3, + "y": 0.3, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 31 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 126, + "height": 98 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0cUIDHRMpO+I/pJNcH8snV" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 31 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@c31a4", + "__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__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30AqRrtoFFO7TtXORONOsR" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8b9AqR/NNJ34v2wVDvcXCR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 38 + }, "propertyPath": [ "_name" ], @@ -602,7 +736,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 30 + "__id__": 38 }, "propertyPath": [ "_lpos" @@ -610,14 +744,14 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 193.99, + "y": 221.493, "z": 0 } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 30 + "__id__": 38 }, "propertyPath": [ "_lrot" @@ -633,7 +767,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 30 + "__id__": 38 }, "propertyPath": [ "_euler" @@ -648,7 +782,91 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 35 + "__id__": 38 + }, + "propertyPath": [ + "_lscale" + ], + "value": { + "__type__": "cc.Vec3", + "x": 1.3, + "y": 1.3, + "z": 1 + } + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 44 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 43 + }, + "asset": { + "__uuid__": "b02b7a49-ba72-4956-8b7e-31dc476377f1", + "__expectedType__": "cc.Prefab" + }, + "fileId": "54R/aYBglLI4Jn5pm++Jx8", + "instance": { + "__id__": 45 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "ed6VStPDNN5L9seHpMcpLs", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 46 + }, + { + "__id__": 48 + }, + { + "__id__": 49 + }, + { + "__id__": 50 + }, + { + "__id__": 51 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_name" + ], + "value": "maxr" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "54R/aYBglLI4Jn5pm++Jx8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 }, "propertyPath": [ "_lpos" @@ -656,214 +874,56 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 10.531, + "y": -14.295, "z": 0 } }, { - "__type__": "cc.TargetInfo", - "localID": [ - "16MuhUBUpB2ZdBTYflEf1n" - ] + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 30 + "__id__": 47 }, "propertyPath": [ - "_lscale" + "_euler" ], "value": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 38 - }, - "propertyPath": [ - "_contentSize" - ], - "value": { - "__type__": "cc.Size", - "width": 200, - "height": 20 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "cdvV5hAkdEaY6AT6urHKuf" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 40 - }, - "propertyPath": [ - "_contentSize" - ], - "value": { - "__type__": "cc.Size", - "width": 100, - "height": 10 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "73XD/xCtdN56MXQv4d3Zpr" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 42 - }, - "propertyPath": [ - "_contentSize" - ], - "value": { - "__type__": "cc.Size", - "width": 100, - "height": 10 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "6eLgGcjghBaJCJdqSzqDJp" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 44 - }, - "propertyPath": [ - "_contentSize" - ], - "value": { - "__type__": "cc.Size", - "width": 100, - "height": 10 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7f9LGtOY9DM6ZTL5+fc4gA" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 46 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -50, + "x": 0, "y": 0, "z": 0 } }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "61x78YGExIH5sbDV+PvuuK" - ] - }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 48 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 3.342, - "z": 0 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "32HF124+5LVqGOnUmyAZ0q" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 50 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 3.342, - "z": 0 - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "4bGUhFXlZF/Jdkcq0HY9ai" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 48 + "__id__": 47 }, "propertyPath": [ "_lscale" ], "value": { "__type__": "cc.Vec3", - "x": 0.9, - "y": 1.5, + "x": 2, + "y": 2.5, "z": 1 } }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 50 - }, - "propertyPath": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.9, - "y": 1.5, - "z": 1 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 30 - }, - "propertyPath": [ - "_active" - ], - "value": true - }, { "__type__": "cc.UITransform", "_name": "", @@ -874,7 +934,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 53 }, "_contentSize": { "__type__": "cc.Size", @@ -902,7 +962,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 55 }, "anm": { "__id__": 5 @@ -923,7 +983,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 59 + "__id__": 57 }, "debugMode": false, "_id": "" @@ -942,7 +1002,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 61 + "__id__": 59 }, "enabledContactListener": true, "bullet": false, @@ -976,7 +1036,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 63 + "__id__": 61 }, "tag": 0, "_group": 4, @@ -1012,6 +1072,9 @@ "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": [ + { + "__id__": 43 + }, { "__id__": 26 }, diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index 86ba5e75..a50cfde7 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -244,8 +244,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.7, - "y": 0.8, + "x": 1, + "y": 1, "z": 1 }, "_mobility": 0, @@ -284,7 +284,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -50, + "x": -35, "y": 0, "z": 0 }, @@ -325,7 +325,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, + "width": 70, "height": 10 }, "_anchorPoint": { @@ -503,7 +503,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 340, + "width": 240, "height": 40 }, "_anchorPoint": { @@ -628,7 +628,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, + "width": 70, "height": 10 }, "_anchorPoint": { @@ -706,7 +706,7 @@ "__id__": 12 }, "_mode": 0, - "_totalLength": 100, + "_totalLength": 70, "_progress": 1, "_reverse": false, "_id": "" @@ -774,7 +774,7 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.7, + "x": 1, "y": 1, "z": 1 }, @@ -814,7 +814,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -50, + "x": -35, "y": 0, "z": 0 }, @@ -855,7 +855,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, + "width": 70, "height": 10 }, "_anchorPoint": { @@ -1033,7 +1033,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 340, + "width": 240, "height": 40 }, "_anchorPoint": { @@ -1158,7 +1158,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, + "width": 70, "height": 10 }, "_anchorPoint": { @@ -1236,7 +1236,7 @@ "__id__": 36 }, "_mode": 0, - "_totalLength": 100, + "_totalLength": 70, "_progress": 1, "_reverse": false, "_id": "" @@ -1304,8 +1304,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.8, + "x": 1, + "y": 1, "z": 1 }, "_mobility": 0, @@ -1344,7 +1344,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -50, + "x": -35, "y": 0, "z": 0 }, @@ -1385,7 +1385,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, + "width": 70, "height": 10 }, "_anchorPoint": { @@ -1461,10 +1461,10 @@ }, "_alignFlags": 45, "_target": null, - "_left": 1, - "_right": 1, - "_top": 0.5, - "_bottom": 0.5, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -1688,7 +1688,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, + "width": 70, "height": 10 }, "_anchorPoint": { @@ -1710,7 +1710,7 @@ "node": { "__id__": 56 }, - "_enabled": true, + "_enabled": false, "__prefab": { "__id__": 76 }, @@ -1766,7 +1766,7 @@ "__id__": 60 }, "_mode": 0, - "_totalLength": 100, + "_totalLength": 70, "_progress": 1, "_reverse": false, "_id": "" @@ -1802,8 +1802,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100, - "height": 30 + "width": 70, + "height": 20 }, "_anchorPoint": { "__type__": "cc.Vec2", diff --git a/assets/script/Main.ts b/assets/script/Main.ts index eb8f5af2..bb5c2a5b 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -12,7 +12,7 @@ const { ccclass, property } = _decorator; @ccclass('Main') export class Main extends Root { start() { - PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb + // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb // |EPhysics2DDrawFlags.Pair // |EPhysics2DDrawFlags.CenterOfMass // |EPhysics2DDrawFlags.Joint diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 343d19f4..a761ffa1 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -120,6 +120,9 @@ export class HeroViewComp extends CCComp { if (hpNode) { this.hpBarBasePos = hpNode.position.clone(); } + if(this.model.fac==FacSet.HERO){ + hpNode.getChildByName("Bar").getComponent(Sprite).color=new Color("#2ECC71") + } // let hp_y = this.node.getComponent(UITransform).height+10; // this.top_node.setPosition(0, hp_y, 0); }