buff修改
This commit is contained in:
@@ -116,7 +116,8 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
|
||||
stop_cd: number = 0.5; /*停止倒计时*/
|
||||
|
||||
yun_cd: number = 0.5; //眩晕倒计时
|
||||
ice_cd: number = 0.5; //冰冻倒计时
|
||||
dir_y:number = 0;
|
||||
speek_time:number = 0;
|
||||
|
||||
@@ -203,6 +204,7 @@ export class HeroViewComp extends CCComp {
|
||||
this.is_atking=true
|
||||
}
|
||||
}
|
||||
|
||||
onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
|
||||
}
|
||||
update(dt: number){
|
||||
@@ -215,15 +217,30 @@ export class HeroViewComp extends CCComp {
|
||||
if (this.pwt.update(dt)) {
|
||||
this.pw+=this.pws
|
||||
}
|
||||
|
||||
this.check_power()
|
||||
this.check_atk_buffs(dt)
|
||||
this.check_atk_counts()
|
||||
this.in_stop(dt);
|
||||
this.at += dt;
|
||||
this.check_atk_counts()
|
||||
this.check_enemy_alive()
|
||||
this.check_mission_buf()
|
||||
|
||||
if(this.ice_cd > 0){ this.ice_cd -=dt; return }
|
||||
if(this.yun_cd > 0){ this.yun_cd -=dt; return }
|
||||
this.at += dt;
|
||||
|
||||
this.in_stop(dt);
|
||||
this.in_atk(dt);
|
||||
this.move(dt);
|
||||
this.check_mission_buf()
|
||||
}
|
||||
check_iceed(dt:number){
|
||||
if(this.ice_cd > 0){
|
||||
this.ice_cd -= dt;
|
||||
if(this.ice_cd <= 0){
|
||||
this.ice_cd = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
check_yuned(dt:number){
|
||||
|
||||
}
|
||||
check_mission_buf(){
|
||||
this.ap_max=(100+smc.vmdata.mission.ap)/100*this.ap
|
||||
@@ -491,17 +508,6 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
}
|
||||
}
|
||||
exp_add(exp:number=0){
|
||||
if(this.box_group==BoxSet.HERO){
|
||||
smc.vmdata.mission.exp +=exp
|
||||
}
|
||||
if(this.box_group==BoxSet.MONSTER){
|
||||
smc.vmdata.mission.mexp +=exp
|
||||
}
|
||||
}
|
||||
power_add(p:number){
|
||||
this.pw+= p
|
||||
}
|
||||
//使用max_skill
|
||||
handle_skill(skill:number){
|
||||
this.as.max()
|
||||
@@ -599,9 +605,28 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
}
|
||||
|
||||
exp_add(exp:number=0){
|
||||
if(this.box_group==BoxSet.HERO){
|
||||
smc.vmdata.mission.exp +=exp
|
||||
}
|
||||
if(this.box_group==BoxSet.MONSTER){
|
||||
smc.vmdata.mission.mexp +=exp
|
||||
}
|
||||
}
|
||||
power_add(p:number){
|
||||
this.pw+= p
|
||||
}
|
||||
hp_max_add(){
|
||||
console.log("hp_max_add 动画");
|
||||
}
|
||||
add_ap(ap: number,time:number=0){
|
||||
this.ap += ap;
|
||||
}
|
||||
|
||||
add_shield(shield:number){
|
||||
this.shield =shield
|
||||
console.log("shield:",shield);
|
||||
}
|
||||
add_hp(hp: number=0){
|
||||
this.BUFFCOMP.heathed();
|
||||
this.hp+=hp;
|
||||
@@ -638,33 +663,6 @@ export class HeroViewComp extends CCComp {
|
||||
// }, 15);
|
||||
}
|
||||
}
|
||||
add_ap(ap: number,time:number=0){
|
||||
this.ap += ap;
|
||||
}
|
||||
check_atk_buffs(dt: number){
|
||||
for(let i=0;i<this.ap_buffs.length;i++){
|
||||
let buff=this.ap_buffs[i];
|
||||
buff.time -= dt;
|
||||
if(buff.time <= 0){
|
||||
this.ap_buff -= buff.ap
|
||||
this.ap_buffs.splice(i,1);
|
||||
}
|
||||
}
|
||||
if(this.ap_buffs.length <= 0){
|
||||
this.ap_buff = 0
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
buff_icon_change(icon:string,value:boolean){
|
||||
// this.node.getChildByName("top").getChildByName("buff").getChildByName(icon).active=value
|
||||
}
|
||||
add_shield(shield:number){
|
||||
this.shield =shield
|
||||
console.log("shield:",shield);
|
||||
}
|
||||
/** 静止时间 */
|
||||
in_stop (dt: number) {
|
||||
if(this.stop_cd > 0){
|
||||
|
||||
Reference in New Issue
Block a user