技能系统基本完善 ,现在需要完善基础技能
This commit is contained in:
@@ -71,7 +71,7 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||
this.node.active = true;
|
||||
console.log("[SkillCom]:caster",this.caster)
|
||||
// console.log("[SkillCom]:caster",this.caster)
|
||||
|
||||
|
||||
let collider = this.getComponent(Collider2D);
|
||||
@@ -95,15 +95,15 @@ export class SkillCom extends CCComp {
|
||||
this.node.setPosition(this.targetPos.x,this.targetPos.y,0)
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
console.log("[SkillCom]:has anim",anim)
|
||||
// console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
console.log("[SkillCom]:has spine",this.spine)
|
||||
// console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
// console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ export class SkillCom extends CCComp {
|
||||
if(this.hit_count > 0) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半
|
||||
if(target == null) return;
|
||||
target.do_atked(this.ap,this.caster_crit,this.caster_crit_d) // ap 及暴击 属性已经在skill.ts 处理
|
||||
console.log("[SkillCom]:single_damage",this.ap,this.caster_crit,this.caster_crit_d)
|
||||
// console.log("[SkillCom]:single_damage",this.ap,this.caster_crit,this.caster_crit_d)
|
||||
if(SkillSet[this.s_uuid].debuff>0){
|
||||
let deUP =this.get_debuff() // 因为不是每个技能都需要,debuff的增益在这里处理, ap 及暴击 属性已经在skill.ts 处理
|
||||
let debuff=SkillSet[this.s_uuid]
|
||||
@@ -144,7 +144,7 @@ export class SkillCom extends CCComp {
|
||||
let deR=debuff.deR+deUP.deR
|
||||
dev=Math.round(dev*100)/100
|
||||
let deC=debuff.deC+deUP.deC //dec只作为次数叠加
|
||||
console.log("[SkillCom]:debuff",SkillSet[this.s_uuid].name,debuff.debuff,deUP.deV,deUP.deC)
|
||||
// console.log("[SkillCom]:debuff",SkillSet[this.s_uuid].name,debuff.debuff,deUP.deV,deUP.deC)
|
||||
target.add_debuff(debuff.debuff,dev,deC,deR)
|
||||
}
|
||||
this.hit_count++
|
||||
@@ -176,7 +176,7 @@ export class SkillCom extends CCComp {
|
||||
private startLinearMove(dt: number) {
|
||||
if (!this.speed || this.is_destroy) return;
|
||||
if(this.s_uuid == 6005){
|
||||
console.log("[SkillCom]:startLinearMove",this.node.position.x)
|
||||
// console.log("[SkillCom]:startLinearMove",this.node.position.x)
|
||||
}
|
||||
// 使用角度方向移动
|
||||
const newX = this.node.position.x + this.speed * dt*this.scale;
|
||||
@@ -203,7 +203,7 @@ export class SkillCom extends CCComp {
|
||||
if(config.EType==EType.timeEnd){
|
||||
this.run_time+=deltaTime
|
||||
if(this.run_time>config.in){
|
||||
console.log("[SkillCom]: timeEnd destroy",this.s_uuid,this.run_time)
|
||||
// console.log("[SkillCom]: timeEnd destroy",this.s_uuid,this.run_time)
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user