重做 局内经验的利用,加攻 加血,特殊技能,todo:先完成物品设定

This commit is contained in:
2024-11-25 00:02:07 +08:00
parent 5a268cc8f2
commit 2d4d564c1f
31 changed files with 5212 additions and 6212 deletions

View File

@@ -71,8 +71,8 @@ export class Hero extends ecs.Entity {
var hv = node.getComponent(HeroViewComp)!;
// console.log("hero_init",buff)
let HInf= smc.heros[uuid] // 角色数据
let talent= smc.vm_data.talent
let hero =smc.vm_data.heros[uuid]
let talent= smc.vmdata.talent
let hero =smc.vmdata.heros[uuid]
let talents=Talents;
hv.scale = scale;
hv.box_group = box_group;

View File

@@ -205,7 +205,7 @@ export class HeroViewComp extends CCComp {
onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
}
update(dt: number){
if(!smc.vm_data.mission.play||smc.vm_data.pause) return
if(!smc.vmdata.mission.play||smc.vmdata.pause) return
if(this.is_dead) {
if(!this.in_grave()) this.to_grave()
return
@@ -279,7 +279,7 @@ export class HeroViewComp extends CCComp {
}
}
move(dt: number){
if(this.stop_cd > 0||smc.vm_data.mission.is_victory||smc.vm_data.mission.is_defeat){
if(this.stop_cd > 0||smc.vmdata.mission.is_victory||smc.vmdata.mission.is_defeat){
this.status_change("idle")
return
}
@@ -436,14 +436,14 @@ 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.type == 1)smc.vmdata.mission.a_exp +=exp
if(this.type == 2)smc.vmdata.mission.h_exp +=exp
if(this.type == 3)smc.vmdata.mission.s_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
if(this.type == 1)smc.vmdata.mission.ma_exp +=exp
if(this.type == 2)smc.vmdata.mission.mh_exp +=exp
if(this.type == 3)smc.vmdata.mission.ms_exp +=exp
}
}
//使用max_skill