update 添加松鼠角色

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-10-30 02:34:11 +08:00
parent ca84f38096
commit bb4334c0ff
178 changed files with 6352 additions and 195 deletions

View File

@@ -1,12 +1,6 @@
import { TableGRole } from "../../../resources/config/ts/TableGRole";
import GRoleBase from "../base/role/GRoleBase";
//角色实体类
export default interface GRole {
id:number; //宠物Id
range:number; //宠物攻击范围
}
//角色工具类
export class GRoleUtil{
@@ -21,16 +15,13 @@ export class GRoleUtil{
}
//通过Id 获取 GRole
static getGRole(id:number):GRole{
static getGRole(id:number):TableGRole{
let info:TableGRole;
if(!(info = TableGRole.getConfig(id))) return null;
return {
id:info.id,
range:info.roleAttackRange,
}
return info
}
static getGRoles(ids:number[]):GRole[]{
static getGRoles(ids:number[]):TableGRole[]{
return ids.map(id => GRoleUtil.getGRole(id));
}