{
  "code": "import { NodeUtil } from \"../GameUtils/NodeUtil\";\r\nimport { Vector3Helper } from \"../GameUtils/Vector3Helper\";\r\nimport { AssetManager } from \"../Resources/AssetManager\";\r\nimport { MateMove } from \"./MateMove\";\r\nexport default class MateHpBarBehav extends Laya.Script3D {\r\n    constructor() {\r\n        super();\r\n    }\r\n    onAwake() {\r\n        this._gameobject = this.owner;\r\n        this._headPos = NodeUtil.GetChildByName(this._gameobject, \"UiPos\");\r\n        this._matebehav = this._gameobject.getComponent(MateMove);\r\n        this._hpBar = new Laya.ProgressBar(\"Main/youxi-1-5.png\");\r\n        this._hpBar.anchorX = this._hpBar.anchorY = 0.5;\r\n        Laya.stage.addChild(this._hpBar);\r\n    }\r\n    onUpdate() {\r\n        let sp = new Laya.Sprite3D();\r\n        sp.transform.position = this._headPos.transform.position.clone();\r\n        sp.transform.rotationEuler = this._headPos.transform.rotationEuler.clone();\r\n        sp.transform.translate(new Laya.Vector3(0, 0.4, 0), false);\r\n        let pt = Vector3Helper.Zero;\r\n        AssetManager.Instance.maincamera.worldToViewportPoint(sp.transform.position, pt);\r\n        this._hpBar.pos(pt.x, pt.y);\r\n        this._hpBar.value = this._matebehav.health / this._matebehav.maxhealth;\r\n    }\r\n    onDestroy() {\r\n        this._hpBar.destroy();\r\n        this._hpBar = null;\r\n    }\r\n}\r\n//# sourceMappingURL=MateHpBarBehav.js.map",
  "references": [
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/NodeUtil.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Game/BossBehav.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/Vector3Helper.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Resources/AssetManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Game/MateMove.ts"
  ],
  "map": "{\"version\":3,\"file\":\"MateHpBarBehav.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Game/MateHpBarBehav.ts\"],\"names\":[],\"mappings\":\"AAAA,O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