monster add
This commit is contained in:
@@ -3,6 +3,7 @@ import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs
|
||||
import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { smc } from "../../common/SingletonModuleComp";
|
||||
import { Role } from "../../role/Role";
|
||||
import { Monster } from "../../monster/monster";
|
||||
// import MapRoadUtils from "./map/road/MapRoadUtils";
|
||||
import { MapViewScene } from "./MapViewScene";
|
||||
import { Timer } from "../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
@@ -49,15 +50,15 @@ export class MapViewComp extends CCComp {
|
||||
this.scene.node.active = true
|
||||
// smc.monsters = ['war','magic','heath']
|
||||
// smc.heros = ['war','magic','heath']
|
||||
if (smc.heros.length>0){
|
||||
let hero = ecs.getEntity<Role>(Role);
|
||||
let x = this.getRandomInt(-300, 0)
|
||||
hero.load(this.aStarToVec3(x+',60'), false, "magic");
|
||||
}
|
||||
// if (smc.heros.length>0){
|
||||
// let hero = ecs.getEntity<Role>(Role);
|
||||
// let x = this.getRandomInt(-300, 0)
|
||||
// hero.load(this.aStarToVec3(x+',60'), false, "magic");
|
||||
// }
|
||||
if (smc.monsters.length>0){
|
||||
let monster = ecs.getEntity<Role>(Role);
|
||||
let x = this.getRandomInt(0, 300)
|
||||
monster.load(this.aStarToVec3(x+'60'), true, "magic");
|
||||
let monster = ecs.getEntity<Monster>(Monster);
|
||||
let x = this.getRandomInt(-100, 100)
|
||||
monster.load(this.aStarToVec3(x+',-60'));
|
||||
}
|
||||
|
||||
// smc.own.loadJoystick();
|
||||
|
||||
Reference in New Issue
Block a user