环境技能继续
This commit is contained in:
@@ -33,7 +33,7 @@ export class MissionHomeComp extends CCComp {
|
||||
}
|
||||
|
||||
start_mission(e:any,args:any) {
|
||||
console.log("start_mission")
|
||||
console.log("mission home start_mission")
|
||||
for(let i=0;i<this.heros.length;i++){
|
||||
this.heros[i].to_destroy()
|
||||
}
|
||||
@@ -55,7 +55,6 @@ export class MissionHomeComp extends CCComp {
|
||||
}
|
||||
}
|
||||
select_hero(h_uuid:number){
|
||||
console.log("select_hero",h_uuid)
|
||||
for(let i=0;i<4;i++){
|
||||
if(this.heros_pos[i].uuid==0){
|
||||
this.heros_pos[i].uuid=h_uuid
|
||||
@@ -63,17 +62,14 @@ export class MissionHomeComp extends CCComp {
|
||||
break
|
||||
}
|
||||
}
|
||||
console.log("select_hero",this.heros_pos)
|
||||
}
|
||||
cancel_hero(h_uuid:number){
|
||||
console.log("cancel_hero",h_uuid)
|
||||
for(let i=0;i<4;i++){
|
||||
if(this.heros_pos[i].uuid==h_uuid){
|
||||
this.heros_pos[i].uuid=0
|
||||
this.destory_hero(h_uuid)
|
||||
}
|
||||
}
|
||||
console.log("cancel_hero",this.heros_pos)
|
||||
}
|
||||
call_hero(h_uuid:number,index:number){
|
||||
var path = "game/heros/uiheros/"+HeroInfo[h_uuid].path;
|
||||
@@ -83,10 +79,8 @@ export class MissionHomeComp extends CCComp {
|
||||
node.parent = scene.entityLayer!.node!
|
||||
node.setPosition(this.heros_pos[index].px,BoxSet.GAME_LINE,0);
|
||||
let comp = node.getComponent(UiHeroComp)
|
||||
console.log("call_hero",node)
|
||||
comp.h_uuid = h_uuid
|
||||
this.heros.push(comp)
|
||||
console.log("call heros",this.heros)
|
||||
}
|
||||
destory_hero(h_uuid:number){
|
||||
console.log("destory hero",this.heros)
|
||||
|
||||
Reference in New Issue
Block a user