启示位置变化

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

@@ -48,9 +48,9 @@ export class MissionComp extends CCComp {
}
start() {
this.heros_node=this.node.getChildByName("heros")
this.herosc_node=this.node.getChildByName("herosc")
this.herosc_node.active=false
this.node.getChildByName('hbg').active=false
// this.herosc_node=this.node.getChildByName("herosc")
// this.herosc_node.active=false
// this.node.getChildByName('hbg').active=false
this.heros_node_pos=v3(this.heros_node.position.x,this.heros_node.position.y,this.heros_node.position.z)
// this.VictoryComp=this.node.getChildByName("victory").getComponent(VictoryComp)
}
@@ -65,7 +65,7 @@ export class MissionComp extends CCComp {
// }
}
show_herosc(event: string, args: any){
this.node.getChildByName('hbg').active=true
// this.node.getChildByName('hbg').active=true
const screenSize = this.node.getComponent(UITransform).contentSize;
const centerY = screenSize.height / 2;
tween(this.heros_node).to(0.1,{position:v3(this.heros_node.position.x,centerY,0)}, // 这里以node的位置信息坐标缓动的目标
@@ -81,11 +81,11 @@ export class MissionComp extends CCComp {
call_hero(event: string, args: any){
console.log("call_hero",args)
oops.message.dispatchEvent(GameEvent.CallHero,{uuid:this.hero_args.uuid,pos:args})
this.herosc_node.active=false
// this.herosc_node.active=false
this.heros_node.active=true
this.heros_node.position=this.heros_node_pos
this.hero_args=null
this.node.getChildByName('hbg').active=false
// this.node.getChildByName('hbg').active=false
}
mission_start(){
/* todo 关卡设定完善*/