技能 继续
This commit is contained in:
@@ -59,6 +59,11 @@ export class RoleViewComp extends CCComp {
|
||||
power_speed: number = 1; //能量回复速度每0.1秒回复量
|
||||
skill:8001;
|
||||
skills:any=[]
|
||||
skill1:any=[]
|
||||
skill2:any=[]
|
||||
skill3:any=[]
|
||||
skill4:any=[]
|
||||
skill5:any=[]
|
||||
st_boncus: number = 1; //技能持续时间加成
|
||||
s_boncus: number = 1; //技能效果加成
|
||||
buff_atks:any = [];
|
||||
@@ -179,16 +184,23 @@ export class RoleViewComp extends CCComp {
|
||||
this.check_enemys()
|
||||
}
|
||||
skill_cds(dt:number){
|
||||
this.skills.forEach((e:any) => {
|
||||
if(e.cd > 0&&e.alive){
|
||||
e.cd -= dt;
|
||||
if(e.cd <= 0){
|
||||
this.shoot(e.uuid);
|
||||
e.cd=smc.skills[e.uuid].cd
|
||||
console.log("shoot uuid :"+e.uuid);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.skill1.cd -= dt;
|
||||
if(this.skill1.cd <= 0){
|
||||
this.shoot(this.skill1.uuid);
|
||||
this.skill1.cd=this.skill1.cd_max
|
||||
console.log("shoot uuid :"+this.skill1.uuid);
|
||||
}
|
||||
|
||||
// this.skills.forEach((e:any) => {
|
||||
// if(e.cd > 0&&e.alive){
|
||||
// e.cd -= dt;
|
||||
// if(e.cd <= 0){
|
||||
// this.shoot(e.uuid);
|
||||
// e.cd=smc.skills[e.uuid].cd
|
||||
// console.log("shoot uuid :"+e.uuid);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// console.log(this.skills);
|
||||
}
|
||||
check_enemys(){
|
||||
@@ -460,6 +472,8 @@ export class RoleViewComp extends CCComp {
|
||||
|
||||
}
|
||||
dead(){
|
||||
oops.message.dispatchEvent("minssion_defeat");
|
||||
|
||||
var path = "game/skills/dead";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
|
||||
Reference in New Issue
Block a user