mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
@@ -13,7 +13,7 @@ import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAtta
|
||||
import { GAttack, GAttackBase } from "../attack/GAttack";
|
||||
import { TableGRole } from "../../../../resources/config/ts/TableGRole";
|
||||
import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill";
|
||||
import { GSkill, GSkillBase } from "../../skill/GSkill";
|
||||
import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill";
|
||||
import JNSkeleton from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/spine/JNFrameSkeleton";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -131,9 +131,8 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
this.fsm && this.fsm.onUpdate(dt / 1000);
|
||||
this.fsmAnim && this.fsmAnim.onUpdate(dt / 1000);
|
||||
|
||||
if(frame.index == 100){
|
||||
this.skills[0] && this.skills[0].release();
|
||||
}
|
||||
//更新技能
|
||||
this.skills.forEach(skill => skill.onUpdate(dt));
|
||||
|
||||
}
|
||||
|
||||
@@ -227,12 +226,13 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
//击飞
|
||||
onFly(){
|
||||
|
||||
console.log("onFly");
|
||||
if(this.nId == 1)
|
||||
console.log("onFly");
|
||||
let vWorld = this.node.worldPosition;
|
||||
let vEndWorld = this.getWorldBackLen(v2(1000,500));
|
||||
this.JTween(vWorld)
|
||||
.to({x:vEndWorld.x},800)
|
||||
.onUpdate(pos => this.node.worldPosition = vWorld)
|
||||
.onUpdate(pos => this.node.worldPosition = pos)
|
||||
.start();
|
||||
this.JTween(vWorld)
|
||||
.to({y:vEndWorld.y},800)
|
||||
@@ -252,6 +252,37 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
return roles.filter(role => role.type != this.type);
|
||||
}
|
||||
|
||||
//判断是否可以释放技能
|
||||
isReleaseSkill():boolean{
|
||||
for (const skill of this.skills) {
|
||||
if(skill.isRelease()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//释放技能
|
||||
onReleaseSkill():boolean{
|
||||
for (const skill of this.skills) {
|
||||
if(skill.isRelease()){
|
||||
skill.release();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//是否正在释放技能
|
||||
isReleasingSkill():boolean {
|
||||
for (const skill of this.skills) {
|
||||
if(skill.state() == GSkillState.Releasing){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -51,6 +51,10 @@ export default class GRolePVPEntity extends GRoleBase<GDemoMessage>{
|
||||
|
||||
//更新显示
|
||||
this.bloodVolume.progress = this.blood / this.fullBlood;
|
||||
//显示第一个技能进度条
|
||||
if(this.skills[0]){
|
||||
this.energyVolume.progress = this.skills[0].getProgress();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user