diff --git a/assets/resources/gui/element/hnode.prefab b/assets/resources/gui/element/hnode.prefab index 69c49574..95dbe7f6 100644 --- a/assets/resources/gui/element/hnode.prefab +++ b/assets/resources/gui/element/hnode.prefab @@ -34,14 +34,14 @@ "_active": true, "_components": [ { - "__id__": 54 + "__id__": 58 }, { - "__id__": 56 + "__id__": 60 } ], "_prefab": { - "__id__": 58 + "__id__": 62 }, "_lpos": { "__type__": "cc.Vec3", @@ -1217,10 +1217,16 @@ "_components": [ { "__id__": 51 + }, + { + "__id__": 53 + }, + { + "__id__": 55 } ], "_prefab": { - "__id__": 53 + "__id__": 57 }, "_lpos": { "__type__": "cc.Vec3", @@ -1279,6 +1285,69 @@ "__type__": "cc.CompPrefabInfo", "fileId": "56gTtOUjNGIJx4xuuZN5eh" }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 54 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_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": "747U1TyPJCOYb6NqYEk5DD" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 56 + }, + "playOnLoad": false, + "_clips": [], + "_defaultClip": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2e7ip9iHRCkpgbEWKgWSjG" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -1302,7 +1371,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 59 }, "_contentSize": { "__type__": "cc.Size", @@ -1330,7 +1399,10 @@ }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 61 + }, + "icon_node": { + "__id__": 50 }, "_id": "" }, diff --git a/assets/script/game/map/HInfoComp.ts b/assets/script/game/map/HInfoComp.ts index 0afa6746..c766185a 100644 --- a/assets/script/game/map/HInfoComp.ts +++ b/assets/script/game/map/HInfoComp.ts @@ -3,12 +3,14 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { HeroAttrsComp } from "../hero/HeroAttrsComp"; -const { ccclass } = _decorator; +const {property, ccclass } = _decorator; /** 视图层对象 */ @ccclass('HInfoComp') @ecs.register('HInfoComp', false) export class HInfoComp extends CCComp { + @property(Node) + icon_node=null! private eid: number = 0; private model: HeroAttrsComp | null = null; private apLabel: Label | null = null;