有修改

This commit is contained in:
2024-11-04 13:05:30 +08:00
parent 47321fc91d
commit f2275d1a0d
55 changed files with 6683 additions and 13132 deletions

View File

@@ -145,7 +145,6 @@ export class MapMonsterComp extends CCComp {
let hero:any =RandomManager.instance.getRandomByObjectList(smc.cards, 1);
console.log("better_call:",hero)
this.addHero(hero[0].uuid)
this.addHero(hero[0].uuid)
}
monster_refresh(){
if (this.setp_num <= 0){
@@ -153,7 +152,7 @@ export class MapMonsterComp extends CCComp {
}
let m:any = RandomManager.instance.getRandomByObjectList(this.mission_list[this.monster_level],1)
var scene = smc.map.MapView.scene;
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE+this.start_ys[this.mon_index])
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE)
let monster_layer = scene.entityLayer!.node!
this.addMonster(m[0],monster_layer,pos)
this.mon_index += 1
@@ -245,7 +244,7 @@ export class MapMonsterComp extends CCComp {
}
load_role(){
let role = ecs.getEntity<Role>(Role);
let pos = v3(BoxSet.HERO_START+50,BoxSet.GAME_LINE-5)
let pos = v3(BoxSet.HERO_START-100,BoxSet.GAME_LINE-5)
role.load(pos,109)
smc.Role=role
// console.log("加载玩家",role)
@@ -257,15 +256,10 @@ export class MapMonsterComp extends CCComp {
private addHero(uuid:number=1001) {
let hero = ecs.getEntity<Hero>(Hero);
var scene = smc.map.MapView.scene;
let pos:Vec3 = v3(-210-this.hero_x*30,BoxSet.GAME_LINE+this.start_ys[this.hero_index]);
let pos:Vec3 = v3(-210-this.hero_x*30,BoxSet.GAME_LINE);
let monster_layer = scene.entityLayer!.node!
let scale = 1
hero.load(pos,scale,uuid,monster_layer);
this.hero_index += 1
if(this.hero_index > 2){
this.hero_index = 0
this.hero_x +=1
}
this.set_start_point()
}