mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
添加角色 远程攻击逻辑
This commit is contained in:
@@ -32,4 +32,12 @@ export class TableGRole {
|
||||
/** Spine地址 */
|
||||
get spine(): string {
|
||||
return this.data.spine;
|
||||
}
|
||||
/** 角色技能Id */
|
||||
get roleSkillId(): number {
|
||||
return this.data.roleSkillId;
|
||||
}
|
||||
/** 角色攻击范围 */
|
||||
get roleAttackRange(): number {
|
||||
return this.data.roleAttackRange;
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleAttack {
|
||||
static TableName: string = "GRoleAttack";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleAttack } {
|
||||
return JsonUtil.get(TableGRoleAttack.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleAttack.getAllConfig()[id] as TableGRoleAttack;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(roleId: number) {
|
||||
var table = JsonUtil.get(TableGRoleAttack.TableName);
|
||||
this.data = table[roleId];
|
||||
this._roleId = roleId;
|
||||
}
|
||||
/** 角色Id */
|
||||
private _roleId: number = 0;
|
||||
|
||||
/** 角色Id */
|
||||
get roleId(): number {
|
||||
return this.data.roleId;
|
||||
}
|
||||
/** 攻击方式 */
|
||||
get attackWay(): string {
|
||||
return this.data.attackWay;
|
||||
}
|
||||
/** 攻击参数 */
|
||||
get attackArgs(): string[] {
|
||||
return this.data.attackArgs;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "4879e3d4-3b08-4e70-af99-add884d50af3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleAttackBullet {
|
||||
static TableName: string = "GRoleAttackBullet";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleAttackBullet } {
|
||||
return JsonUtil.get(TableGRoleAttackBullet.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleAttackBullet.getAllConfig()[id] as TableGRoleAttackBullet;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRoleAttackBullet.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** Id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** Id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 子弹名称 */
|
||||
get bulletName(): string {
|
||||
return this.data.bulletName;
|
||||
}
|
||||
/** 子弹地址 */
|
||||
get bulletSrc(): string {
|
||||
return this.data.bulletSrc;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0c4a411b-9551-4944-9662-79468f748d6e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user