dd
This commit is contained in:
@@ -60,7 +60,10 @@ export class MapViewComp extends CCComp {
|
||||
this.gold_add(dt)
|
||||
}
|
||||
monster_refresh(){
|
||||
this.addMonster(1001)
|
||||
if(smc.monsters.length > 0 ){
|
||||
this.addMonster(smc.monsters[0].uuid)
|
||||
}
|
||||
|
||||
}
|
||||
gold_add(dt: number) {
|
||||
smc.vm_data.gold.time += dt;
|
||||
@@ -88,10 +91,11 @@ export class MapViewComp extends CCComp {
|
||||
}
|
||||
private addMonster(uuid:number=1001) {
|
||||
this.scene.node.active = true
|
||||
let monster = ecs.getEntity<Monster>(Monster);
|
||||
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE)
|
||||
let camp = -1
|
||||
monster.load(pos,camp,uuid);
|
||||
let monster = ecs.getEntity<Monster>(Monster);
|
||||
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE)
|
||||
let camp = -1
|
||||
monster.load(pos,camp,uuid);
|
||||
smc.monsters.splice(0,1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user