dd
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user