任务开始 技能清空
This commit is contained in:
@@ -14,83 +14,92 @@ const { ccclass, property } = _decorator;
|
|||||||
@ecs.register('EquipsComp', false)
|
@ecs.register('EquipsComp', false)
|
||||||
export class EquipsCompComp extends CCComp {
|
export class EquipsCompComp extends CCComp {
|
||||||
|
|
||||||
weapon:any={
|
weapon:any=null
|
||||||
uuid:0,
|
armor:any=null
|
||||||
name:"weapon",
|
ring:any=null
|
||||||
type:"weapon",
|
skill1:any=null
|
||||||
level:0,
|
skill2:any=null
|
||||||
quality:0,
|
skill3:any=null
|
||||||
|
|
||||||
skill_uuid:0,
|
|
||||||
skill_name:"skill1",
|
|
||||||
skill_type:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
}
|
|
||||||
armor:any={
|
|
||||||
uuid:0,
|
|
||||||
name:"armor",
|
|
||||||
type:"armor",
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
skill_uuid:0,
|
|
||||||
skill_name:"skill1",
|
|
||||||
skill_type:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
}
|
|
||||||
ring:any={
|
|
||||||
uuid:0,
|
|
||||||
name:"ring",
|
|
||||||
type:"ring",
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
skill_uuid:0,
|
|
||||||
skill_name:"skill1",
|
|
||||||
skill_type:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
}
|
|
||||||
skill1:any={
|
|
||||||
uuid:0,
|
|
||||||
name:"skill1",
|
|
||||||
type:0, //1 被动 0 主动
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
}
|
|
||||||
skill2:any={
|
|
||||||
uuid:0,
|
|
||||||
name:"skill2",
|
|
||||||
type:0,//
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
}
|
|
||||||
skill3:any={
|
|
||||||
uuid:0,
|
|
||||||
name:"skill3",
|
|
||||||
type:0,//
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
}
|
|
||||||
boxs:Node=null
|
boxs:Node=null
|
||||||
/** 视图层逻辑代码分离演示 */
|
/** 视图层逻辑代码分离演示 */
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.on(GameEvent.UseSkillCard, this.get_skill, this);
|
this.on(GameEvent.UseSkillCard, this.get_skill, this);
|
||||||
|
this.on(GameEvent.FightReady,this.fight_ready,this)
|
||||||
|
this.boxs=this.node.getChildByName("boxs")
|
||||||
}
|
}
|
||||||
start(){
|
start(){
|
||||||
this.boxs=this.node.getChildByName("boxs")
|
this.fight_ready()
|
||||||
|
}
|
||||||
|
fight_ready(){
|
||||||
this.boxs.getChildByName("skill1").getChildByName("icon").active=false
|
this.boxs.getChildByName("skill1").getChildByName("icon").active=false
|
||||||
this.boxs.getChildByName("skill2").getChildByName("icon").active=false
|
this.boxs.getChildByName("skill2").getChildByName("icon").active=false
|
||||||
this.boxs.getChildByName("skill3").getChildByName("icon").active=false
|
this.boxs.getChildByName("skill3").getChildByName("icon").active=false
|
||||||
this.boxs.getChildByName("weapon").getChildByName("icon").active=false
|
this.boxs.getChildByName("weapon").getChildByName("icon").active=false
|
||||||
this.boxs.getChildByName("armor").getChildByName("icon").active=false
|
this.boxs.getChildByName("armor").getChildByName("icon").active=false
|
||||||
this.boxs.getChildByName("ring").getChildByName("icon").active=false
|
this.boxs.getChildByName("ring").getChildByName("icon").active=false
|
||||||
|
this.weapon={
|
||||||
|
uuid:0,
|
||||||
|
name:"weapon",
|
||||||
|
type:"weapon",
|
||||||
|
level:0,
|
||||||
|
quality:0,
|
||||||
|
skill_uuid:0,
|
||||||
|
skill_name:"skill1",
|
||||||
|
skill_type:0,
|
||||||
|
cd:0,
|
||||||
|
cd_time:0,
|
||||||
|
}
|
||||||
|
this.armor={
|
||||||
|
uuid:0,
|
||||||
|
name:"armor",
|
||||||
|
type:"armor",
|
||||||
|
level:0,
|
||||||
|
quality:0,
|
||||||
|
skill_uuid:0,
|
||||||
|
skill_name:"skill1",
|
||||||
|
skill_type:0,
|
||||||
|
cd:0,
|
||||||
|
cd_time:0,
|
||||||
|
}
|
||||||
|
this.ring={
|
||||||
|
uuid:0,
|
||||||
|
name:"ring",
|
||||||
|
type:"ring",
|
||||||
|
level:0,
|
||||||
|
quality:0,
|
||||||
|
skill_uuid:0,
|
||||||
|
skill_name:"skill1",
|
||||||
|
skill_type:0,
|
||||||
|
cd:0,
|
||||||
|
cd_time:0,
|
||||||
|
}
|
||||||
|
this.skill1={
|
||||||
|
uuid:0,
|
||||||
|
name:"skill1",
|
||||||
|
type:0, //1 被动 0 主动
|
||||||
|
level:0,
|
||||||
|
quality:0,
|
||||||
|
cd:0,
|
||||||
|
cd_time:0,
|
||||||
|
}
|
||||||
|
this.skill2={
|
||||||
|
uuid:0,
|
||||||
|
name:"skill2",
|
||||||
|
type:0,//
|
||||||
|
level:0,
|
||||||
|
quality:0,
|
||||||
|
cd:0,
|
||||||
|
cd_time:0,
|
||||||
|
}
|
||||||
|
this.skill3={
|
||||||
|
uuid:0,
|
||||||
|
name:"skill3",
|
||||||
|
type:0,//
|
||||||
|
level:0,
|
||||||
|
quality:0,
|
||||||
|
cd:0,
|
||||||
|
cd_time:0,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
update(dt: number): void {
|
update(dt: number): void {
|
||||||
if(!smc.mission.play||smc.mission.pause) return
|
if(!smc.mission.play||smc.mission.pause) return
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export class MissionComp extends CCComp {
|
|||||||
|
|
||||||
async mission_start(){
|
async mission_start(){
|
||||||
smc.mission.status=MissionStatus.ready
|
smc.mission.status=MissionStatus.ready
|
||||||
|
oops.message.dispatchEvent(GameEvent.FightReady)
|
||||||
this.node.active=true
|
this.node.active=true
|
||||||
this.data_init()
|
this.data_init()
|
||||||
this.hart_hero_load()
|
this.hart_hero_load()
|
||||||
@@ -79,7 +80,7 @@ export class MissionComp extends CCComp {
|
|||||||
break
|
break
|
||||||
case MissionStatus.ready_hero_select:
|
case MissionStatus.ready_hero_select:
|
||||||
console.log("netx to_fight")
|
console.log("netx to_fight")
|
||||||
this.to_fight()
|
this.to_fight()
|
||||||
break
|
break
|
||||||
case MissionStatus.playing:
|
case MissionStatus.playing:
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user