This commit is contained in:
2024-08-09 17:17:28 +08:00
parent 327094d5e9
commit 37bc93aa1c
131 changed files with 2775 additions and 7049 deletions

View File

@@ -75,18 +75,17 @@ export class MapViewComp extends CCComp {
}
/** 添加玩家 */
private addHero() {
this.scene.node.active = true
if(smc.heros.length>0) {
console.log("heros load")
let hero = ecs.getEntity<Hero>(Hero);
let pos = v3(BoxSet.HERO_START,BoxSet.GAME_LINE)
let speed =smc.heros[0].speed
let camp = 1
let prefab_path = smc.heros[0].prefab_path
let name = smc.heros[0].name
hero.load(pos,speed,camp,prefab_path,name);
smc.heros.splice(0,1)
}
this.scene.node.active = true
if(smc.heros.length>0) {
let hero = ecs.getEntity<Hero>(Hero);
let pos = v3(BoxSet.HERO_START,BoxSet.GAME_LINE)
let speed =smc.heros[0].speed
let camp = 1
let prefab_path = smc.heros[0].prefab_path
let name = smc.heros[0].name
hero.load(pos,speed,camp,prefab_path,name);
smc.heros.splice(0,1)
}
}
private addMonster() {
this.scene.node.active = true