mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交地图选择
This commit is contained in:
@@ -3,6 +3,7 @@ import Singleton from "../../../../../extensions/ngame/assets/ngame/util/Singlet
|
||||
import { app } from "../../../App";
|
||||
import { PlayerPetOV } from "../../../consts/API";
|
||||
import { GAPI } from "../../../consts/GAPI";
|
||||
import GOnHookData from "../../../data/GOnHookData";
|
||||
import PlayerPetData from "../../../data/PlayerPetData";
|
||||
import { GUI } from "../../../ui/UIConfig";
|
||||
|
||||
@@ -10,7 +11,9 @@ export enum GOnHookManagerEvent{
|
||||
//添加死亡野怪
|
||||
ADD_KILL_SREEP = "GOnHookManagerEvent_ADD_KILL_SREEP",
|
||||
//删除死亡野怪
|
||||
DEL_KILL_SREEP = "GOnHookManagerEvent_DEL_KILL_SREEP"
|
||||
DEL_KILL_SREEP = "GOnHookManagerEvent_DEL_KILL_SREEP",
|
||||
//删除死亡野怪
|
||||
UPDATE_MAP = "GOnHookManagerEvent_UPDATE_MAP"
|
||||
}
|
||||
|
||||
//游戏模式 OnHook 管理器
|
||||
@@ -116,6 +119,17 @@ export default class GOnHookManager extends Singleton{
|
||||
return await GAPI.GOnHookSellCreeps(creeps.key);
|
||||
}
|
||||
|
||||
//切换场景
|
||||
async setMap(mapId:number){
|
||||
|
||||
await GOnHookData.getIns().setMap(mapId);
|
||||
|
||||
//通知地图已切换
|
||||
app.event.emit(GOnHookManagerEvent.UPDATE_MAP);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user