mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update 添加松鼠角色
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user