mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
44 lines
958 B
TypeScript
44 lines
958 B
TypeScript
|
import { TableGRole } from "../../../resources/config/ts/TableGRole";
|
||
|
import GBaseMode from "../GBaseMode";
|
||
|
import { GRoleUtil } from "../entity/GRole";
|
||
|
import { GTactical } from "../entity/GTactical";
|
||
|
|
||
|
|
||
|
//角色
|
||
|
export enum GOnHookModePlayerEnum{
|
||
|
PLAYER, //玩家
|
||
|
ENEMY, //怪物
|
||
|
}
|
||
|
|
||
|
//玩家信息
|
||
|
export interface GOnHookPlayerInfo{
|
||
|
//阵法
|
||
|
tactical: GTactical;
|
||
|
//宠物列表
|
||
|
roles: TableGRole[];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 挂机模式 无限出现小怪
|
||
|
*/
|
||
|
export default class GOnHookMode extends GBaseMode<{}>{
|
||
|
|
||
|
//玩家信息
|
||
|
playerInfo;
|
||
|
|
||
|
|
||
|
onSyncInitSuccess():void{
|
||
|
|
||
|
//初始化战斗
|
||
|
console.log("GOnHookMode 模式初始化");
|
||
|
|
||
|
this.playerInfo = { tactical: GTactical.getTactical(), roles: GRoleUtil.getGRoles([10001,10001,10001,10001,10003,10003]) };
|
||
|
|
||
|
//生成玩家
|
||
|
// this.playerInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.PLAYER,index+1,info))
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|