dd
This commit is contained in:
@@ -67,7 +67,7 @@ export const SkillSet={
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const MSkills={
|
export const MSkills={
|
||||||
1101:{uuid:1101,path:"1001",type:1,tg:3,up_exp:10,name: "火球术",info:"释放一个火球术攻击敌人",ssk:1001,
|
1101:{uuid:1101,path:"1001",name: "火球术",info:"释放一个火球术攻击敌人",type:1,for_type:false,shoot:true,buff:false,tg:3,up_exp:10,ssk:1001,
|
||||||
ap:20,ap_up:1,cd:1},
|
ap:20,ap_up:1,cd:1},
|
||||||
}
|
}
|
||||||
export const MSkillset={
|
export const MSkillset={
|
||||||
|
|||||||
@@ -36,9 +36,21 @@ export class MSkillComp extends CCComp {
|
|||||||
this.node.getComponent(ProgressBar).progress=this.cdt/this.cd
|
this.node.getComponent(ProgressBar).progress=this.cdt/this.cd
|
||||||
if(this.cdt<=0){
|
if(this.cdt<=0){
|
||||||
this.cdt=this.cd
|
this.cdt=this.cd
|
||||||
|
if(this.skill.shoot){
|
||||||
this.shoot_enemy()
|
this.shoot_enemy()
|
||||||
|
}else if(this.skill.buff){
|
||||||
|
this.add_buff()
|
||||||
|
}else{
|
||||||
|
this.to_mission()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
to_mission(){
|
||||||
|
//特殊技能,如 增加一次免死, 复活等
|
||||||
|
}
|
||||||
|
add_buff(){
|
||||||
|
//buff 技能,如 加血 加攻 加生命值最大值
|
||||||
|
}
|
||||||
shoot_enemy(){
|
shoot_enemy(){
|
||||||
let skill = ecs.getEntity<Skill>(Skill);
|
let skill = ecs.getEntity<Skill>(Skill);
|
||||||
let {pos,t_pos}=this.get_enemy_pos()
|
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 t_pos:Vec3 = v3(0,0)
|
||||||
let dir = 720
|
let dir = 720
|
||||||
let enemy = v3(720,BoxSet.GAME_LINE)
|
let enemy = v3(720,BoxSet.GAME_LINE)
|
||||||
|
|
||||||
console.log("mskill 获取自己坐标:"+ this.node.position );
|
|
||||||
if(this.box_group == BoxSet.MONSTER){
|
if(this.box_group == BoxSet.MONSTER){
|
||||||
let t_pos:Vec3 = v3(-720,0)
|
let t_pos:Vec3 = v3(-720,0)
|
||||||
for (let i = 0; i < smc.hero_pos.length; i++) {
|
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)
|
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}
|
return {pos,t_pos}
|
||||||
}
|
}
|
||||||
/** 全局消息逻辑处理 */
|
/** 全局消息逻辑处理 */
|
||||||
|
|||||||
Reference in New Issue
Block a user