diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index e1ed7388..a21123af 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -14936,7 +14936,7 @@ "__id__": 673 }, "templateMode": false, - "watchPath": "data.mission.d_exp", + "watchPath": "data.mission.md_exp", "labelType": "cc.Label", "watchPathArr": [], "_id": "" @@ -15967,7 +15967,7 @@ "__id__": 719 }, "templateMode": false, - "watchPath": "data.mission.c_exp", + "watchPath": "data.mission.mc_exp", "labelType": "cc.Label", "watchPathArr": [], "_id": "" @@ -16859,7 +16859,7 @@ "__id__": 759 }, "templateMode": false, - "watchPath": "data.mission.b_exp", + "watchPath": "data.mission.mb_exp", "labelType": "cc.Label", "watchPathArr": [], "_id": "" @@ -17890,7 +17890,7 @@ "__id__": 805 }, "templateMode": false, - "watchPath": "data.mission.a_exp", + "watchPath": "data.mission.ma_exp", "labelType": "cc.Label", "watchPathArr": [], "_id": "" diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 451eb9a8..621dc2ef 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -107,6 +107,10 @@ export class Hero extends ecs.Entity { hv.crit = HInf.crit; //暴击率 hv.crit_add = HInf.crit_add;//暴击伤害加成 hv.dodge = HInf.dodge; //闪避率 + hv.aep=HInf.aep; + hv.uaep=HInf.uaep; + hv.dep=HInf.dep; + hv.edep=HInf.edep, this.add(hv); } set_ratio(uuid:number){ diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index afa4fe37..f5800a92 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -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(){ diff --git a/assets/script/game/map/MIssionController.ts b/assets/script/game/map/MIssionController.ts index 502b9bd0..2c229c42 100644 --- a/assets/script/game/map/MIssionController.ts +++ b/assets/script/game/map/MIssionController.ts @@ -61,7 +61,7 @@ export class MissionComp extends CCComp { } start() { - + } protected update(dt: number): void { @@ -107,7 +107,15 @@ export class MissionComp extends CCComp { this.refresh_timer= new Timer(smc.vm_data.mission.refresh_timer); this.boss_num=1 this.boss_timer = new Timer(smc.vm_data.mission.boss_cd) - smc.vm_data.mission.coin = 0 + //局内数据初始化 + smc.vm_data.mission.a_exp=0 //近战经验石 + smc.vm_data.mission.b_exp=0 //远程经验石 + smc.vm_data.mission.c_exp=0 //辅助经验石 + smc.vm_data.mission.d_exp=0 //特殊经验石 + smc.vm_data.mission.ma_exp=0 //敌方近战经验石 + smc.vm_data.mission.mb_exp=0 //敌方远程经验石 + smc.vm_data.mission.mc_exp=0 //敌方辅助经验石 + smc.vm_data.mission.md_exp=0 //敌方特殊经验石 } mission_end(){ smc.vm_data.mission.play=false @@ -129,18 +137,6 @@ export class MissionComp extends CCComp { monsters[i].HeroView.ent.destroy() } } - on_mon_dead(){ - let coin =(GameSet.MON_COIN_ADD*smc.vm_data.mission.coin_reward_add*(1+Talents[1006].bonus*smc.vm_data.talent[1006].lv)).toFixed(0) - smc.vm_data.mission.coin += parseFloat(coin) - smc.vm_data.mission.reward_num += 1; - smc.vm_data.mission.reward_gold +=10+(1-smc.vm_data.mission.mission_lv)*1 - smc.vm_data.mission.reward_exp +=10+(1-smc.vm_data.mission.mission_lv)*1 - smc.vm_data.mission.m_alive -= 1; - if(smc.vm_data.mission.m_alive <= 0){ - smc.vm_data.mission.victory = 1; - oops.message.dispatchEvent("minssion_victory"); - } - } monster_refresh(){