启示位置变化

This commit is contained in:
2025-04-22 16:19:43 +08:00
parent b75ee1da2d
commit d3cdbff3d9
4 changed files with 489 additions and 977 deletions

View File

@@ -19,9 +19,9 @@ const { ccclass, property } = _decorator;
export class MissionHeroCompComp extends CCComp {
timer:Timer=new Timer(2)
start_pos:any={
0:{pos:v3(-140,130,0),has:false},
1:{pos:v3(-220,130,0),has:false},
2:{pos:v3(-300,130,0),has:false},
0:{pos:v3(-140,135,0),has:false},
1:{pos:v3(-270,205,0),has:false},
2:{pos:v3(-270,65,0),has:false},
}
onLoad(){
this.on(GameEvent.UserHeroCard,this.call_hero,this)
@@ -58,7 +58,8 @@ export class MissionHeroCompComp extends CCComp {
}
let hero = ecs.getEntity<Hero>(Hero);
let scale = 1
let pos:Vec3 = v3(HeroPos[HeroInfo[uuid].type].pos);
let pos:Vec3 = this.start_pos[HeroInfo[uuid].type].pos;
console.log("hero load0",pos,this.start_pos)
hero.load(pos,scale,uuid,info);
this.start_pos[HeroInfo[uuid].type].has=true
}