This commit is contained in:
2025-08-05 17:25:34 +08:00
parent 3db3cc78eb
commit 6f9529ada2
20 changed files with 3120 additions and 1623 deletions

View File

@@ -43,7 +43,7 @@ export class MissionHeroCompComp extends CCComp {
}
private zhao_huan(event: string, args: any){
console.log("[MissionHeroComp]:zhaohuan",args)
this.addHero(args.uuid,false,true)
this.addHero(args.uuid,false)
}
@@ -57,19 +57,12 @@ export class MissionHeroCompComp extends CCComp {
// let x=RandomManager.instance.getRandomInt(0,hero_list.length,1)
// // let uuid=args.uuid
// // console.log("call_hero",uuid)
this.addHero(args.uuid,args.is_master,false)
this.addHero(args.uuid,false)
}
/** 添加英雄 */
private addHero(uuid:number=1001,is_master:boolean=false,is_zhaohuan:boolean=false) {
let hero_pos=1
if(is_master){
hero_pos=0
}
if(is_zhaohuan){
hero_pos=2
}
private addHero(uuid:number=1001,is_zhaohuan:boolean=false) {
let hero_pos=0
let hero = ecs.getEntity<Hero>(Hero);
let scale = 1
let pos:Vec3 = HeroPos[hero_pos].pos;