mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交地图
This commit is contained in:
@@ -81,7 +81,8 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
//监听攻击
|
||||
this.fsmAnim.addEventListener(GRoleAnimEvent.Attack,this.onAttack.bind(this));
|
||||
//监听死亡击飞
|
||||
this.fsmAnim.addStartListener(GPetAminEnum.Fly,this.onFly.bind(this));
|
||||
// this.fsmAnim.addStartListener(GPetAminEnum.Fly,this.onFly.bind(this));
|
||||
this.killBack.push(this.onFly.bind(this));
|
||||
}
|
||||
|
||||
//初始化
|
||||
@@ -106,7 +107,10 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
//设置血条位置
|
||||
if(this.spine){
|
||||
let runtimeData = this.spine.skeletonData.getRuntimeData();
|
||||
let headY = (runtimeData.height + runtimeData.y + 20) * this.spine.node.scale.x;
|
||||
let height = Math.abs(runtimeData.height);
|
||||
let y = Math.abs(runtimeData.y);
|
||||
let x = Math.abs(this.spine.node.scale.x);
|
||||
let headY = (height + y + 20) * x;
|
||||
this.headInfo.setPosition(v3(this.headInfo.position.x,headY,this.headInfo.position.z))
|
||||
}
|
||||
|
||||
@@ -155,7 +159,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
this.JTween(vWorld)
|
||||
.to({x:vEndWorld.x},1200)
|
||||
.onUpdate(pos => {
|
||||
if(this.node.isValid)
|
||||
if(this.node && this.node.isValid)
|
||||
this.node.worldPosition = pos;
|
||||
})
|
||||
.start();
|
||||
@@ -163,7 +167,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
.to({y:vEndWorld.y},1200)
|
||||
.easing(JEasing.Circular.Out)
|
||||
.onUpdate(pos => {
|
||||
if(this.node.isValid)
|
||||
if(this.node && this.node.isValid)
|
||||
this.node.worldPosition = vWorld
|
||||
})
|
||||
.start();
|
||||
|
Reference in New Issue
Block a user