mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
Merge branch 'master' of https://gitee.com/jisol/jisol-game
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { _decorator } from "cc";
|
||||
import { _decorator,Node } from "cc";
|
||||
import GRoleBase, { GRoleAnimEvent } from "./GRoleBase";
|
||||
import { ProgressBar } from "cc";
|
||||
import { JNFrameInfo } from "../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
|
||||
@@ -14,12 +14,16 @@ import { TB } from "../../../config/data/schema";
|
||||
import { TD } from "../../../App";
|
||||
import { GPetAminEnum } from "../anim/GPetAnim";
|
||||
import { UIOpacity } from "cc";
|
||||
import { v3 } from "cc";
|
||||
const { property,ccclass } = _decorator;
|
||||
|
||||
//默认角色类
|
||||
@ccclass('GRoleDefault')
|
||||
export default class GRoleDefault extends GRoleBase<{}>{
|
||||
|
||||
@property(Node)
|
||||
headInfo:Node;
|
||||
|
||||
@property(ProgressBar)
|
||||
bloodVolume:ProgressBar;
|
||||
|
||||
@@ -98,6 +102,13 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
let info = TD.TbGRoleSkill.get(skillId);
|
||||
return (new GSkill[info.skillController]()).bind(this,info);
|
||||
})
|
||||
|
||||
//设置血条位置
|
||||
if(this.spine){
|
||||
let runtimeData = this.spine.skeletonData.getRuntimeData();
|
||||
let headY = (runtimeData.height + runtimeData.y + 20) * this.spine.node.scale.x;
|
||||
this.headInfo.setPosition(v3(this.headInfo.position.x,headY,this.headInfo.position.z))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user