mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-12-08 14:00:02 +00:00
重构继承关系
This commit is contained in:
43
JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts
Normal file
43
JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
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))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user