霸气2段技能存在问题, 加血buff 特效一直存在, 这2个问题需要解决
This commit is contained in:
@@ -76,12 +76,14 @@ export class SkillCom extends CCComp {
|
||||
do_buff(hero:any){
|
||||
this.to_console(" do_buff hero: ",hero)
|
||||
if(SkillSet[this.s_uuid].hp > 0){ //buff加血
|
||||
let increase_hp=Math.floor(this.hp/(this.in_time/this.cd))
|
||||
// let increase_hp=Math.floor(this.hp/(this.in_time/this.cd))
|
||||
let increase_hp=Math.floor(this.hp)
|
||||
hero.add_hp(increase_hp)
|
||||
}
|
||||
|
||||
if(SkillSet[this.s_uuid].apup > 0){ //buff加攻击
|
||||
let increase_atk=Math.floor(this.apup/(this.in_time/this.cd))
|
||||
// let increase_atk=Math.floor(this.apup/(this.in_time/this.cd))
|
||||
let increase_atk=Math.floor(this.apup)
|
||||
hero.add_ap(increase_atk)
|
||||
}
|
||||
|
||||
@@ -90,7 +92,8 @@ export class SkillCom extends CCComp {
|
||||
hero.add_shield(this.shield)
|
||||
}
|
||||
if(SkillSet[this.s_uuid].mhp > 0){ //hp最大值
|
||||
console.log("do_buff mhp: ",this.mhp/(this.in_time/this.cd))
|
||||
// console.log("do_buff mhp: ",this.mhp/(this.in_time/this.cd))
|
||||
console.log("do_buff mhp: ",this.mhp)
|
||||
hero.add_hp_max(this.mhp/(this.in_time/this.cd))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,22 @@ export class seCom extends Component {
|
||||
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
let anim = this.node.getComponent(Animation);
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
console.log("has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
var spine = this.node.getChildByName('anm').getComponent('sp.Skeleton') as sp.Skeleton;
|
||||
console.log("has spine",spine)
|
||||
spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
console.log("[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
Reference in New Issue
Block a user