dd
This commit is contained in:
@@ -44,8 +44,8 @@ export class CardControllerComp extends CCComp {
|
||||
|
||||
protected onLoad(): void {
|
||||
// oops.message.on("do_reward", this.do_reward, this)
|
||||
oops.message.on("minssion_victory", this.do_minssion_victory, this)
|
||||
oops.message.on("minssion_defeat", this.do_minssion_defeat, this)
|
||||
oops.message.on("to_mission", this.to_mission, this)
|
||||
|
||||
}
|
||||
start() {
|
||||
|
||||
@@ -72,39 +72,6 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
}
|
||||
|
||||
do_minssion_victory(){
|
||||
this.node.getChildByName("victory").active=true
|
||||
this.to_mission()
|
||||
}
|
||||
|
||||
do_minssion_defeat(){
|
||||
this.node.getChildByName("defeat").active=true
|
||||
this.to_mission()
|
||||
}
|
||||
end_mission(){
|
||||
this.node.getChildByName("victory").active=false
|
||||
this.node.getChildByName("defeat").active=false
|
||||
console.log("end_mission")
|
||||
}
|
||||
empty_mission(){
|
||||
let monsters:any= ecs.query(ecs.allOf(MonViewComp));
|
||||
let heros:any= ecs.query(ecs.allOf(HeroViewComp));
|
||||
let roles:any= ecs.query(ecs.allOf(RoleViewComp));
|
||||
let boss:any= ecs.query(ecs.allOf(BossViewComp));
|
||||
for(let i=0;i<monsters.length;i++){
|
||||
monsters[i].MonView.ent.destroy()
|
||||
}
|
||||
for(let i=0;i<heros.length;i++){
|
||||
heros[i].HeroView.ent.destroy()
|
||||
}
|
||||
for(let i=0;i<roles.length;i++){
|
||||
roles[i].RoleView.ent.destroy()
|
||||
}
|
||||
for(let i=0;i<boss.length;i++){
|
||||
boss[i].BossView.ent.destroy()
|
||||
}
|
||||
|
||||
}
|
||||
normal_call(){
|
||||
if(smc.vm_data.mission.coin >= smc.vm_data.mission.normal_cost){
|
||||
smc.vm_data.mission.coin -= smc.vm_data.mission.normal_cost
|
||||
|
||||
Reference in New Issue
Block a user