dd
This commit is contained in:
@@ -12,29 +12,29 @@ export class MapModelComp extends ecs.Comp {
|
||||
/** 初始地图编号 */
|
||||
id: number = 1;
|
||||
|
||||
/** 地图数据配置 */
|
||||
resConfigMap: string = "config/map/map";
|
||||
// /** 地图数据配置 */
|
||||
// resConfigMap: string = "config/map/map";
|
||||
|
||||
/** 地图转场点数据配置 */
|
||||
resDeliveryMap: string = "config/map/map_delivery";
|
||||
// /** 地图转场点数据配置 */
|
||||
// resDeliveryMap: string = "config/map/map_delivery";
|
||||
|
||||
/** 地图显示预制 */
|
||||
resPrefab: string = "game/map/map_rpg";
|
||||
|
||||
/** 地图内容资源 */
|
||||
getResContentMiniMap(mapName: string): string {
|
||||
return `content/map/${mapName}/${mapName}/miniMap/texture`;
|
||||
};
|
||||
// getResContentMiniMap(mapName: string): string {
|
||||
// return `content/map/${mapName}/${mapName}/miniMap/texture`;
|
||||
// };
|
||||
|
||||
/** 地图瓦片资源 */
|
||||
getResContentSlices(bgName: string, key: string): string {
|
||||
return `content/map/${bgName}/${bgName}/slices/${key}/texture`;
|
||||
};
|
||||
// /** 地图瓦片资源 */
|
||||
// getResContentSlices(bgName: string, key: string): string {
|
||||
// return `content/map/${bgName}/${bgName}/slices/${key}/texture`;
|
||||
// };
|
||||
|
||||
/** 地图数据资源 */
|
||||
getResContentData(mapName: string): string {
|
||||
return `content/map/${mapName}/${mapName}`;
|
||||
};
|
||||
// /** 地图数据资源 */
|
||||
// getResContentData(mapName: string): string {
|
||||
// return `content/map/${mapName}/${mapName}`;
|
||||
// };
|
||||
|
||||
reset() {
|
||||
|
||||
|
||||
@@ -3,7 +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 { Niu } from "../../monster/niu/Niu";
|
||||
import { Hero } from "../../heros/Hero";
|
||||
// import MapRoadUtils from "./map/road/MapRoadUtils";
|
||||
import { MapViewScene } from "./MapViewScene";
|
||||
@@ -57,18 +57,11 @@ export class MapViewComp extends CCComp {
|
||||
private addHero() {
|
||||
|
||||
this.scene.node.active = true
|
||||
if (smc.heros.length>0){
|
||||
let hero = ecs.getEntity<Hero>(Hero);
|
||||
hero.load(v3(-360,-60), smc.heros[0].profession);
|
||||
smc.heros.splice(0,1)
|
||||
}
|
||||
|
||||
|
||||
if (smc.monsters.length>0){
|
||||
|
||||
|
||||
let monster = ecs.getEntity<Monster>(Monster);
|
||||
let monster = ecs.getEntity<Niu>(Niu);
|
||||
monster.load(v3(360,-60),smc.monsters[0].speed);
|
||||
monster.move(v3(0,-60));
|
||||
smc.monsters.splice(0,1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user