技能选择 需要确定是技能1 23 中的哪个
This commit is contained in:
@@ -51,8 +51,8 @@ export class MissionComp extends CCComp {
|
||||
smc.vmdata.mission_data.current_wave++
|
||||
let wave=smc.vmdata.mission_data.current_wave
|
||||
if(wave==FightSet.FRIEND_WAVE_UP){
|
||||
console.log("[任务系统] FRIEND_WAVE_UP 英雄选择 :",wave,FightSet.FRIEND_WAVE_UP)
|
||||
this.to_call_friend()
|
||||
let node= this.node.getChildByName("new_hero")
|
||||
tween(node).to(0.3, {position:v3(node.position.x-200,node.position.y,1)}).start()
|
||||
}
|
||||
if(wave==FightSet.BOSS_WAVE_UP_1){
|
||||
console.log("[任务系统] BOSS_WAVE_UP_1 装备选择 :",wave,FightSet.BOSS_WAVE_UP_1)
|
||||
@@ -74,15 +74,15 @@ export class MissionComp extends CCComp {
|
||||
}
|
||||
if(wave==FightSet.SKILL_WAVE_UP_1){
|
||||
console.log("[任务系统] SKILL_WAVE_UP_1 技能选择 :",wave,FightSet.SKILL_WAVE_UP_1)
|
||||
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
|
||||
this.show_skill_get("skill1")
|
||||
}
|
||||
if(wave==FightSet.SKILL_WAVE_UP_2){
|
||||
console.log("[任务系统] SKILL_WAVE_UP_2 技能选择 :",wave,FightSet.SKILL_WAVE_UP_2)
|
||||
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
|
||||
this.show_skill_get("skill2")
|
||||
}
|
||||
if(wave==FightSet.SKILL_WAVE_UP_3){
|
||||
console.log("[任务系统] SKILL_WAVE_UP_3 技能选择 :",wave,FightSet.SKILL_WAVE_UP_3)
|
||||
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
|
||||
this.show_skill_get("skill3")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -119,6 +119,22 @@ export class MissionComp extends CCComp {
|
||||
oops.message.dispatchEvent(GameEvent.FightEnd)
|
||||
}
|
||||
|
||||
private show_skill_get(e:string){
|
||||
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(e).getChildByName("get").active =true
|
||||
}
|
||||
|
||||
private hide_skill_get(e:any,data:string){
|
||||
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(data).getChildByName("get").active =false
|
||||
}
|
||||
|
||||
private show_skill_change(e:string){
|
||||
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(e).getChildByName("change").active =true
|
||||
}
|
||||
|
||||
private hide_skill_change(e:any,data:any){
|
||||
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(data).getChildByName("change").active =false
|
||||
}
|
||||
|
||||
fight_end(){
|
||||
console.log("任务结束")
|
||||
// 延迟0.5秒后执行任务结束逻辑
|
||||
@@ -184,10 +200,16 @@ export class MissionComp extends CCComp {
|
||||
mission_data.gold-=(mission_data.refresh_gold+mission_data.buff_refresh_gold)
|
||||
|
||||
}
|
||||
call_skill_card(e:any){
|
||||
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
|
||||
}
|
||||
private cleanComponents() {
|
||||
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});
|
||||
}
|
||||
|
||||
hide_call_friend(){
|
||||
let node =this.node.getChildByName("new_hero")
|
||||
tween(node).to(0.3, {position:v3(node.position.x+200,node.position.y,1)}).start()
|
||||
}
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
|
||||
Reference in New Issue
Block a user