局内经验添加 ,先完成局内技能,todo 完成管卡设置
This commit is contained in:
@@ -74,6 +74,10 @@ export class HeroViewComp extends CCComp {
|
||||
uac:number=0;
|
||||
dgc:number=0;
|
||||
crc:number=0;
|
||||
aep:number=0;
|
||||
uaep:number=0;
|
||||
dep:number=0;
|
||||
edep:number=0;
|
||||
ap: number = 10; /**攻击力 */
|
||||
ap_buff: number = 0;
|
||||
ap_buffs:any = [];
|
||||
@@ -112,6 +116,7 @@ export class HeroViewComp extends CCComp {
|
||||
} /** 视图层逻辑代码分离演示 */
|
||||
|
||||
start () {
|
||||
console.log(this.node.parent)
|
||||
this.as.idle()
|
||||
/** 方向 */
|
||||
this.node.setScale(this.scale,1);
|
||||
@@ -418,6 +423,7 @@ export class HeroViewComp extends CCComp {
|
||||
if(this.is_atking){
|
||||
this.at = 0;
|
||||
this.atk_count++
|
||||
this.exp_add(this.aep)
|
||||
// console.log("cd:"+this.cd);
|
||||
this.as.atk();
|
||||
this.scheduleOnce(()=>{
|
||||
@@ -426,6 +432,18 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
}
|
||||
}
|
||||
exp_add(exp:number){
|
||||
if(this.box_group==BoxSet.HERO){
|
||||
if(this.type == 1)smc.vm_data.mission.a_exp +=exp
|
||||
if(this.type == 2)smc.vm_data.mission.b_exp +=exp
|
||||
if(this.type == 3)smc.vm_data.mission.c_exp +=exp
|
||||
}
|
||||
if(this.box_group==BoxSet.MONSTER){
|
||||
if(this.type == 1)smc.vm_data.mission.ma_exp +=exp
|
||||
if(this.type == 2)smc.vm_data.mission.mb_exp +=exp
|
||||
if(this.type == 3)smc.vm_data.mission.mc_exp +=exp
|
||||
}
|
||||
}
|
||||
//使用max_skill
|
||||
handle_skill(skill:number){
|
||||
this.as.atk()
|
||||
@@ -648,6 +666,7 @@ export class HeroViewComp extends CCComp {
|
||||
node.setPosition(pos)
|
||||
node.parent = this.node;
|
||||
this.atked_count++;
|
||||
this.exp_add(this.uaep)
|
||||
}
|
||||
dead(){
|
||||
var path = "game/skills/dead";
|
||||
@@ -656,6 +675,7 @@ export class HeroViewComp extends CCComp {
|
||||
let pos = v3(this.node.position.x,this.node.position.y+30,this.node.position.z);
|
||||
node.parent = this.node.parent;
|
||||
node.setPosition(pos);
|
||||
this.exp_add(this.dep)
|
||||
}
|
||||
toDestroy(){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user