dd
This commit is contained in:
@@ -36,9 +36,21 @@ export class MSkillComp extends CCComp {
|
||||
this.node.getComponent(ProgressBar).progress=this.cdt/this.cd
|
||||
if(this.cdt<=0){
|
||||
this.cdt=this.cd
|
||||
this.shoot_enemy()
|
||||
if(this.skill.shoot){
|
||||
this.shoot_enemy()
|
||||
}else if(this.skill.buff){
|
||||
this.add_buff()
|
||||
}else{
|
||||
this.to_mission()
|
||||
}
|
||||
}
|
||||
}
|
||||
to_mission(){
|
||||
//特殊技能,如 增加一次免死, 复活等
|
||||
}
|
||||
add_buff(){
|
||||
//buff 技能,如 加血 加攻 加生命值最大值
|
||||
}
|
||||
shoot_enemy(){
|
||||
let skill = ecs.getEntity<Skill>(Skill);
|
||||
let {pos,t_pos}=this.get_enemy_pos()
|
||||
@@ -52,8 +64,6 @@ export class MSkillComp extends CCComp {
|
||||
let t_pos:Vec3 = v3(0,0)
|
||||
let dir = 720
|
||||
let enemy = v3(720,BoxSet.GAME_LINE)
|
||||
|
||||
console.log("mskill 获取自己坐标:"+ this.node.position );
|
||||
if(this.box_group == BoxSet.MONSTER){
|
||||
let t_pos:Vec3 = v3(-720,0)
|
||||
for (let i = 0; i < smc.hero_pos.length; i++) {
|
||||
@@ -77,7 +87,6 @@ export class MSkillComp extends CCComp {
|
||||
}
|
||||
}
|
||||
t_pos = v3(enemy.x-this.node.position.x,enemy.y-this.node.position.y)
|
||||
console.log("mskill 获取目标坐标:"+t_pos,pos);
|
||||
return {pos,t_pos}
|
||||
}
|
||||
/** 全局消息逻辑处理 */
|
||||
|
||||
Reference in New Issue
Block a user