召唤师技能完成
This commit is contained in:
@@ -14,73 +14,29 @@ const { ccclass, property } = _decorator;
|
||||
export class ZhanCom extends Component {
|
||||
base:SkillCom = null
|
||||
start() {
|
||||
console.log("ZhanCom:",this.base)
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
let pos = this.node.position
|
||||
let hero:any=null
|
||||
var path = "game/skills/dead";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = this.node.parent;
|
||||
node.setPosition(pos);
|
||||
if(this.base.box_group==BoxSet.HERO) {
|
||||
hero = ecs.getEntity<Hero>(Hero);
|
||||
let scale = 1
|
||||
hero.load(pos,scale,this.base.hero);
|
||||
hero.load(pos,scale,this.base.hero,true,this.base.lv);
|
||||
}
|
||||
if(this.base.box_group==BoxSet.MONSTER) {
|
||||
hero = ecs.getEntity<Monster>(Monster);
|
||||
}
|
||||
if(this.base.box_group==BoxSet.MONSTER) hero = ecs.getEntity<Monster>(Monster);
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
call_hero() {
|
||||
let scale = 1
|
||||
let box_group=BoxSet.HERO
|
||||
var path = "game/heros/"+HeroInfo[this.base.hero].path;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
var scene = smc.map.MapView.scene;
|
||||
node.parent = scene.entityLayer!.node!
|
||||
node.setPosition(this.node.position)
|
||||
oops.message.dispatchEvent("hero_load",this)
|
||||
var hv = node.getComponent(HeroViewComp)!;
|
||||
// console.log("hero_init",buff)
|
||||
let hero= HeroInfo[this.base.hero] // 共用英雄数据数据
|
||||
hv.scale = scale;
|
||||
hv.box_group = box_group;
|
||||
hv.hero_uuid= this.base.hero;
|
||||
hv.hero_name= hero.name;
|
||||
hv.speed =hv.ospeed = hero.speed;
|
||||
hv.dis = hero.dis;
|
||||
hv.pw = hero.pw;
|
||||
hv.pwm= hero.pwm;
|
||||
hv.pws= hero.pws
|
||||
hv.apw=hero.apw;
|
||||
hv.uapw=hero.uapw;
|
||||
hv.cpw=hero.cpw;
|
||||
hv.dpw=hero.dpw;
|
||||
hv.dopw=hero.dopw;
|
||||
hv.type = hero.type;
|
||||
let slv = hv.slv = 1;
|
||||
hv.sk1 = hero.sk1[slv];
|
||||
hv.sk2 = hero.sk2[slv];
|
||||
hv.sk3 = hero.sk3[slv];
|
||||
hv.akc = hero.akc[slv];
|
||||
hv.uac = hero.uac[slv];
|
||||
hv.crc = hero.crc[slv];
|
||||
hv.dgc = hero.dgc[slv];
|
||||
hv.akr = hero.akr[slv];
|
||||
hv.uar = hero.uar[slv];
|
||||
hv.crr = hero.crr[slv];
|
||||
hv.dgr = hero.dgr[slv];
|
||||
hv.rhp_max=this.base.hp
|
||||
hv.ap = this.base.ap
|
||||
hv.def=this.base.def
|
||||
hv.cd = hero.a_cd
|
||||
hv.crit = hero.crit; //暴击率
|
||||
hv.crit_add = hero.crit_add;//暴击伤害加成
|
||||
hv.dodge = hero.dodge; //闪避率
|
||||
hv.aexp=hero.aexp;
|
||||
hv.uaexp=hero.uaexp;
|
||||
hv.cexp=hero.cexp
|
||||
hv.doexp=hero.doexp
|
||||
hv.dexp=hero.dexp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user